'Stop webpage from auto-reload with selenium/chromedriver

Im using python with the selenium package and the chromedriver to scrape a webpage. The page is automatically reloading itself (probably via java-script) every 30 min, which destroyes my scraping-progress.

The webscraping is done with a script and the javascript ist needed for further interaction with the page.

Is it possible to stop the page from reloading itself, maybe with a flag for the chromedriver?



Solution 1:[1]

Found a Solution myself. I had to execute the following dev-tools command with the webdriver:

driver.execute_cdp_cmd('Emulation.setScriptExecutionDisabled', {'value': True})

Solution 2:[2]

You can just open the DevTools and pause the Debugger. Works in Firefox and Chrome (tested)!

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 UnluckyLukeE
Solution 2 Wasif