Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Android parser for new Play Store format #1044

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

imperador
Copy link
Contributor

Updating AndroidAppsMetadata to parse latestPlay Store format

Updating AndroidAppsMetadata to parse newest Play Store format
Copy link
Owner

@mmatyas mmatyas left a comment

Choose a reason for hiding this comment

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

Thanks! I've added some comments.

@@ -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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants