Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Outputting and Responding to Javascript with PyQt

I am trying to use PyQt to load the html of a web page which can then be manipulated and fed back to the page for web scraping. I am basically trying to log into a page with Javascript on it, search for documents to download (by selecting a check box next to the correct one's names), and then clicking a download button which pops out another page.

Does anyone know the functions I would use? Is there a way to discuss this without going into Classes? (My understanding of Classes is not as good as it could be, I am trying to learn, I'm still something of a beginner).

Sorry if I didn't explain this well. I'm trying to use either PyQt or PySide to do this.

like image 333
Steven Matthews Avatar asked Nov 17 '25 23:11

Steven Matthews


1 Answers

I use pyqt/pyside to load a page, wait for the JavaScript to execute, then parse the resulting HTML for the content of interest.

Here is an example script:
http://webscraping.com/blog/Scraping-JavaScript-webpages-with-webkit/

like image 97
hoju Avatar answered Nov 20 '25 12:11

hoju



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!