Questions tagged [python-webbrowser]

Python module that allows the user to load web content with available browsers.

The webbrowser module provides a high-level interface to allow displaying web-based documents to users. Under most circumstances, simply calling the open() function from this module will do the right thing.

More info: https://docs.python.org/3/library/webbrowser.html

406 questions
2
votes
1 answer

Python webbrowser.open line opens two tabs when it is not supposed to

Below I have the following code which opens the correct URL after opening an incorrect one. I know that the link is not getting generated twice because of the print(link) output. So one link is somehow opening two tabs on my browser and I have no…
Pef19
  • 21
  • 5
2
votes
1 answer

Webbrowser 'directory not found' error

I am having a reoccurring error with the webbrowser module on python. Whenever I run this program, I get a multiple errors. import webbrowser google_urls = ["www.gmail.com", "www.youtube.com"] def open_tabs(url_lists): for url in url_lists: …
G.K
  • 21
  • 1
2
votes
1 answer

Getting Instagram redirect from Python Requests?

In performing oauth2 for Instagram there is a redirect call of the form: https://api.instagram.com/oauth/authorize/?client_id=&redirect_uri=&response_type=code&scope=basic+likes+comments When coded with Requests: s =…
2
votes
1 answer

How to clear terminal output when opening URL using webbrowser in python?

I am using webbrowser to open a URL using Python but the problem is after opening the URL webbrowser module prints unnecessary output on terminal. I searched on google but didn't find any useful answer. Code used: import…
Vaibhav Singh
  • 1,554
  • 3
  • 13
  • 27
2
votes
1 answer

Scripting a website-opener

I'm using a python script to take in a file containing a bunch of website URLs and open all of them in new tabs. However, I'm getting an error message when opening the first website: this is what I get: 0:41: execution error:…
ac_nook
  • 325
  • 1
  • 2
  • 11
2
votes
0 answers

Windows Bash and webbrowser.Error: could not locate runnable browser

I am using Windows Bash. I was trying to run jupyter notebook command. It doesn't open browser for me. But It shows me: [I 16:19:44.425 NotebookApp] Serving notebooks from local directory: /home/Dida [I 16:19:44.425 NotebookApp] 0 active kernels [I…
user7040867
2
votes
3 answers

Opening Webpage using Python

I am new to Python coding and i am trying to open a web page using python. I used web browser.open to open the web page. After i opened the web page i want to click a tab called "Submit" on the web page when the timer on the page reaches zero. If i…
buggsbunny4
  • 115
  • 2
  • 12
2
votes
0 answers

Requests sharing a session with browser

Alright this is an interesting question I recently had: If I am using requests, is/could there be a way to share a session with the browser? For example, you POST login data to a website on your Python application, and you are logged in on your…
2
votes
1 answer

Can you get contents of webbrowser.get in Python?

Can I get information about contents of the 'a' variable after using webbrowser.get? I can't get anything more than 'webbrowser.WindowsDefault object at 0x024643B0'. I'd like to know which browser is default and transfer this information to…
JeremyK
  • 147
  • 1
  • 1
  • 10
2
votes
2 answers

Is it possible to use webbrowser or Selenium to grab current URL in browser

Or perhaps "hack" the actual library code for webbrowser or Selenium to do this? I'm looking in the current documentation and not seeing that this is possible, but perhaps you could adjust the actual library code and insert this functionality?…
AdjunctProfessorFalcon
  • 1,790
  • 6
  • 26
  • 62
2
votes
0 answers

Authentication with webbrowser.open() in Python

I want to parse a page and download all the videos it contains. Since the page required authentication, I created a session my_session = requests.Session() login = my_session.post(signin_link,data=signin,headers=post_head) return…
2
votes
1 answer

Python webbrowser platform specific unicode error on osx

I am developing a cross-platform script on a Windows 7, Python 2.7 computer. The script will be also used on a MacOSX computer with Python 2.7 installed. The following script is working perfectly on my Windows computer, however when I run it on the…
DrHaze
  • 1,318
  • 10
  • 22
2
votes
1 answer

Calling pythons webbrowser without stderr and in headless mode

In order to prevent this from being a X Y problem, I will tell you the problem, and the proposed solutions that I cant figure out how to do. I am trying to call the webbrowser module in a script. import…
Nick Humrich
  • 14,905
  • 8
  • 62
  • 85
2
votes
2 answers

Web-crawler for facebook in python

I am tring to work with web-Crawler in python to print the number of facebook recommenders. for example in this article from sky-news(http://news.sky.com/story/1330046/are-putins-little-green-men-back-in-ukraine) there are about 60 facebook…
Yagel
  • 1,184
  • 2
  • 18
  • 41
2
votes
1 answer

Python 3.2 with Tkinter with webbrowser - search program

As the title suggests, I'm trying to create little search tool with GUI. How I want it to work: When I click the button 'search', open 'https://www.google.com/?gws_rd=cr&ei=qr5cU8GJGMnStAao1YG4BA#q=' + key words that I want to search for. These key…
NumeroSMG
  • 41
  • 8