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

Regexps are not found on the play store page #25

Open
Burgov opened this issue Apr 19, 2018 · 6 comments
Open

Regexps are not found on the play store page #25

Burgov opened this issue Apr 19, 2018 · 6 comments

Comments

@Burgov
Copy link

Burgov commented Apr 19, 2018

The plugin wouldn't work, so I decided to debug it. This is the app it's about: https://play.google.com/store/apps/details?id=io.neocles.puma.ns

This plugin is trying to match a few regexps, like "itemprop="datePublished">\s*([\w\s,.]*)\s*<\/div>\s*<\/div>", but the string datePublished does not exist in the HTML of above page.

What am I doing wrong?

@SBats
Copy link
Contributor

SBats commented May 29, 2018

Sory for the late answer, I don't have much time to work on this plugin at the moment.
It might be linked to this issue: #20
Or maybe the Google Play store as changed its markup. Unfortunately, they don't provide an easy way to read this, we have to find it in the page markup :(

@abhayastudios
Copy link

abhayastudios commented Aug 1, 2018

Running into the same issue. GooglePlayHelper._parseResource returns:

{"date":null,"os":null,"version":null}

It probably has a bit of overhead, but maybe it wouldn't be such a bad idea to use a project that maintains scraping the play store like: https://github.com/facundoolano/google-play-scraper

@SBats what do you think? If you are ok with that I wouldn't mind having a go at it...

@SBats
Copy link
Contributor

SBats commented Aug 1, 2018

Hey! Sure that's a good idea. If someone does it better and open source, we should use their tools.
If you feel like doing a PR with that, that would be amazing!

@abhayastudios
Copy link

@SBats it turns out to be a bit more complex than I thought since I didn't realize that the plugin I mentioned depends on specific nodejs modules. I tried using nativescript-nodeify but so far no luck. I'll have another go at soon...

@yeisnier
Copy link

yeisnier commented Dec 30, 2018

In case that somebody needed for Google Play.

Regex need to be updated to match the actual markup to:

  • constants/google-play.ts[6]
    OS: /Requires\sAndroid<(.|\n)?>(\d{1,3}(.\d{1,3}(.\d{1,3})?)?)/gm,
    DATE: /Updated<(.|\n)
    ?>(\w*\s\d{1,2},\s\d{4})/gm,
    VERSION: /Current\sVersion<(.|\n)*?>(\d{1,3}(.\d{1,3}(.\d{1,3})?)?)/gm,

Matching expression will be on index 2

  • helpers/google-play.helper.ts[22]
    infos[key.toLowerCase()] = regEx ? regEx[2] : null

@abhayastudios
Copy link

@yeisnier @SBats looks like the whole regex approach is not relevant anymore for scraping the Play store, since they don't publish version numbers anymore. Looks like the way to go is as described in #30. I think this issue should be closed.

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

No branches or pull requests

4 participants