I'm trying to scrap the full web page with python and selenium. I'm providing the website URL (i.e. https://example.com) which then will scrap the homepage and then it will continue doing this recursively for all subpages by getting the links from the first page. I'm facing serious performance issues as the number of pages can exceed 500 and the selenium will stop in the middle of the execution.
FYI I'm using Selenium as I need to scan JS-based web pages (where content is being generated by JavaScript). Are there any best practices on how to Scrap the full web page content more efficiently? or other similar libraries?