Selenium and Python - Page timeout without throwing an error -
there lot has been written timeout , selenium , page loads.
but none of works in chromedriver.
and of works not looking for.
note: not looking set_page_load_timeout()
what want:
- i say: driver.get("some-weird-slow-place")
- chromedriver says: yes, yes... on way
- [15 seg later...] still on way
- [20 seg later...] okay sir... please javascript
window.stop(); - but! keep working usual whatever loaded elements have.
why want this:
because maybe want url of site , title... , not fancy huge background image or crunchy brunchy punchy animated banners , multiple thousand jquery magics still loading.
what did try:
driver.get(url) driver.execute_script("setinterval(function(){ window.stop(); }, 20000);") but not work, because driver.get() wait until page loaded before executing script.
why need selenium ? how https://www.crummy.com/software/beautifulsoup/bs4/doc/
Comments
Post a Comment