Python Forum
Thread Rating:
  • 1 Vote(s) - 3 Average
  • 1
  • 2
  • 3
  • 4
  • 5
webbrowser
#4
You might as well just use selenium. It also gives you the option of already having that site open for selenium to get the source, and/or execute actions such as mouse clicks, etc.
import time
from selenium import webdriver
URLS = ("https://www.google.com", "http://www.yahoo.com", "http://www.bing.com")

PATH_TO_DRIVER = '/home/metulburr/chromedriver'
browser = webdriver.Chrome(PATH_TO_DRIVER)
browser.set_window_position(0,0)
for url in URLS:
    browser.get(url)
    time.sleep(5)
[Image: pmMgW2I.gif]
Recommended Tutorials:
Reply


Messages In This Thread
webbrowser - by ian - Aug-27-2017, 10:40 PM
RE: webbrowser - by BerlingSwe - Aug-27-2017, 10:50 PM
RE: webbrowser - by ian - Aug-27-2017, 11:54 PM
RE: webbrowser - by metulburr - Aug-28-2017, 01:21 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  webbrowser not working in screen management in kivy thousif 1 1,906 Nov-25-2020, 04:02 PM
Last Post: Axel_Erfurt
  Python - control a webbrowser ARGMER 1 3,448 Oct-26-2018, 06:20 PM
Last Post: metulburr
  Selenium webbrowser send entern and escape key pythongeekme 0 4,135 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