Screen Scraping a Javascript based webpage in Python

前端 未结 3 814
挽巷
挽巷 2020-12-10 20:15

I am working on a screen scraping tool in Python. But, as I look through the source of the webpage, I noticed that most of the data is coming through Javascript.

An

相关标签:
3条回答
  • 2020-12-10 20:40

    I use webkit, which is the browser renderer behind Chrome and Safari. There are Python bindings to webkit through Qt.

    And here is a full Python example to execute JavaScript and extract the final HTML.

    0 讨论(0)
  • 2020-12-10 20:59

    Scraping javascript-based webpages is possible with selenium. In particular, try the Selenium WebDriver.

    0 讨论(0)
  • 2020-12-10 21:00

    You can use the QtWebKit module of the PyQt4 library

    0 讨论(0)
提交回复
热议问题