Oct-26-2018, 09:02 AM
I am trying to control Chrome/Firefox to save a webpage. Specifically, my aim is to
a) Open a Webpage locally on the computer by using Chrome,
b) Save it in RAM/hard drive for further processing.
I have already tried urllib and Selenium but without success, since the webpage I try to save is quite sophisticated and it does not accept these technologies. Thus, I thought the best idea is to open the webpage via a webbrowser and save it locally for processing by using webbrowser's menu.
I found a nice library to open a webpage in Chrome, usage:
a) Open a Webpage locally on the computer by using Chrome,
b) Save it in RAM/hard drive for further processing.
I have already tried urllib and Selenium but without success, since the webpage I try to save is quite sophisticated and it does not accept these technologies. Thus, I thought the best idea is to open the webpage via a webbrowser and save it locally for processing by using webbrowser's menu.
I found a nice library to open a webpage in Chrome, usage:
import webbrowser webbrowser.open_new_tab('http://www.google.com')However, I do not know any library that can control the webbrowser menu. I started to think about some kind of Chrome extension that could be interfaced from Python, but perhaps, there are better solutions. I develop this application in Python 3, Windows. Can someone suggest how to control menu in Chrome/Firefox? Any help is highly appreciated.