Skip to content
New issue

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

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

Already on GitHub? # to your account

The new version 3.10 failed to crawl the app version on Google Play. #720

Open
kingtao1985 opened this issue Jan 31, 2024 · 5 comments
Open
Labels
js-engine Issues related to the js engine

Comments

@kingtao1985
Copy link

kingtao1985 commented Jan 31, 2024

My requirement is to crawl https://play.google.com/store/apps/details?hl=en&id=com.kubi.kucoin, and then simulate clicking the button "See more information on About this app" on the page to get a pop-up Version inside the box. The old version 2.40.0 can run successfully. After upgrading to google play, the Version cannot be obtained. Tracking found that the pop-up box div after clicking the button "See more information on About this app" is not returned.

code is here:

    WebClient webClient = new WebClient(BrowserVersion.CHROME);
    webClient.setAjaxController(new NicelyResynchronizingAjaxController());
    webClient.setJavaScriptTimeout(10000);
    webClient.setJavaScriptErrorListener(new SilentJavaScriptErrorListener());

    WebClientOptions options = webClient.getOptions();
    options.setCssEnabled(false);
    options.setUseInsecureSSL(true);
    options.setJavaScriptEnabled(true);
    options.setThrowExceptionOnScriptError(false);
    options.setWebSocketEnabled(false);
    options.setTimeout(5000);

    HtmlPage page = webClient.getPage("https://play.google.com/store/apps/details?hl=en&id=com.kubi.kucoin");
    webClient.waitForBackgroundJavaScript(5000);
    webClient.waitForBackgroundJavaScriptStartingBefore(5000);

    String jsCode = "document.getElementsByClassName('VfPpkd-Bz112c-LgbsSe yHy1rc eT1oJ QDwDD mN1ivc VxpoF')[0].click();";

    page.executeJavaScript(jsCode);
    webClient.waitForBackgroundJavaScript(10000);
    Document document = Jsoup.parse(page.asXml());
    Element element = document.selectFirst("div:matchesOwn(Version) + div");
    System.out.println(element.ownText());

element is null

@fleboulch
Copy link

Did you try to make it working with v3.9.0 ? I reported some bugs introduced in 3.10.0.

@kingtao1985
Copy link
Author

It doesn't work in 3.9.0 either

@kingtao1985
Copy link
Author

@fleboulch How is the progress on this issue? thanks

@fleboulch
Copy link

I thought it was related to an issue I discovered but finally it seems not.
I did not investigate more. I was just replying to you to try to help

@rbri
Copy link
Member

rbri commented Mar 27, 2024

@kingtao1985 this requires some update of the js support.

At the moment i like to focus on #755 - this will solve the problem at all.
But there is no release date set - hope to know more in one week or so...

@rbri rbri added the js-engine Issues related to the js engine label Mar 27, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
js-engine Issues related to the js engine
Projects
None yet
Development

No branches or pull requests

3 participants