clemfromspace / scrapy-selenium

Scrapy middleware to handle javascript pages using selenium
Do What The F*ck You Want To Public License
919 stars 348 forks source link

wait_until that fires when page is 'generally' loaded #130

Open jbeyer05 opened 1 year ago

jbeyer05 commented 1 year ago

I'm looking for a solution that uses wait_until to wait until a page has fully loaded.

If I was scraping a single site or set of similar pages, I could use wait_until to look for the visibility of a specific element. But the scraper that I'm working on is quite general, so it can't be based on a specific element.

Is there a way to have wait_until leverage something like the document.ready( ) callback?

To complicate things one level further, I would IDEALLY like to wait until React or other JS frameworks have finished rendering their components.

Any thoughts are greatly appreciated. Thanks in advance!