Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Python - control a webbrowser
#1
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:

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.
Reply
#2
(Oct-26-2018, 09:02 AM)ARGMER Wrote: Selenium but without success, since the webpage I try to save is quite sophisticated and it does not accept these technologies
I highly doubt selenium could not get your web page content.

What do you mean by save a page? The HTML?
Recommended Tutorials:
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  webbrowser not working in screen management in kivy thousif 1 1,875 Nov-25-2020, 04:02 PM
Last Post: Axel_Erfurt
  webbrowser ian 3 6,963 Aug-28-2017, 01:21 AM
Last Post: metulburr
  Selenium webbrowser send entern and escape key pythongeekme 0 4,083 Jul-20-2017, 08:31 PM
Last Post: pythongeekme

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020