0

For personal, non-commercial use, I would like to be able to extract user count data from dappradar using python. I have tried using several methods from the requests_html library but can't achieve the desired result. Is there a way to extract the user data using requests_html or another library?

As a first step, I tried the below code with the aim of creating a list of the elements that would include the user count element (as well as other elements). However, this code (and every other version I've tried using different methods) yields an empty list. Presumably, if I could correctly populate the list, I could then print the text of each of the elements in order to obtain the quantity of interest, i.e. the user count.

    from requests_html import HTMLSession

    session = HTMLSession()

    resp = session.get("https://dappradar.com/ethereum/games/axie-infinity")

    resp.html.render()

    containers = resp.html.find("div",containing="article-page__stats-container article- 
    page__stats-container-enabled")

    print(containers)

I'd welcome any suggestions for moving forward with this approach, but am open to alternative approaches as well.

  • 1
    Does this answer your question? [Web-scraping JavaScript page with Python](https://stackoverflow.com/questions/8049520/web-scraping-javascript-page-with-python) – Shiva Jul 28 '21 at 05:48

0 Answers0