How to load only html from web pages in selenium
1 answer
If you need selenium for web scraping, strictly speaking, you will still need javascript and css files, as these can significantly affect page loading and rendering. For example, multiple parts of the page can be loaded with additional ajax calls, or inserted through custom JavaScript logic.
Also, if you only want the HTML portion of the page, why would you need a real browser?
If you still want to prevent js and css files from being loaded, you can adjust specific permissions in Firefox using settings FirefoxProfile
, see
+2
source to share