Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/backend/providers/android_apps/AndroidAppsMetadata.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,9 @@ MetadataHelper::MetadataHelper(QString log_tag)
, rx_meta_itemprops(QStringLiteral(R""(<meta itemprop="(.+?)" content="(.+?)")""), QRegularExpression::DotMatchesEverythingOption)
, rx_background(QStringLiteral(R""(<meta property="og:image" content="(.+?)")""))
, rx_developer(QStringLiteral(R""(<a href="/store\/apps\/dev(eloper)?\?id=.+?" class=".*?">([^<]+)<\/a><\/span>)""))
, rx_category(QStringLiteral(R""(<a itemprop="genre".*?>([^<]+)<\/a>)""))
, rx_category(QStringLiteral(R""(href="\/store\/apps\/category\/([^"]+)" aria-label)""))
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems to me that the category href is uppercase; perhaps we could use the aria label instead? An example:

<a class="..." href="/store/apps/category/TOOLS" aria-label="Tools" jsname="...">

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is a good approach. What about this then:

Suggested change
, rx_category(QStringLiteral(R""(href="\/store\/apps\/category\/([^"]+)" aria-label)""))
, rx_category(QStringLiteral(R""(href="\/store\/apps\/category\/[^"]+" aria-label="(.*?)")""))

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this looks better.

, rx_screenshots(QStringLiteral(R""(<img src="([^"]+=w720-h310)")""))
, rx_release(QStringLiteral(R""("Google Commerce Ltd"],"(.+?)")""))
, rx_release(QStringLiteral(R""("\]\]\],\["(.+?[0-9]{4})",\[)""))
, rx_rating(QStringLiteral(R""("AggregateRating","ratingValue":"(.+?)")""))
{}

Expand Down