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
1
vote
1 answer

Python script stops to execute on startup after some time

More than a month ago I've added this script to my startup applications. It worked just like it should, every single time. Now, for some reason, it's not working every single time (primarily it's not working every single time in the morning, there…
1
vote
2 answers

execution stops after web browser opens

webbrowser.get("C:/Program Files (x86)/Google/Chrome/Application/chrome.exe %s").open('file://' + os.path.realpath('get.html')) print('hello') I have the code above in one of my python files. When I execute it, it opens 'get.html' just fine.…
U_A
  • 143
  • 1
  • 8
1
vote
1 answer

Could not find a version that satisfies the requirement when installing webbrowser module . (Python)

Trying to just install a module. Specifically the webbrowser module. I've had this problem come up a couple times but I was never able to fix it.
1
vote
1 answer

Python 2's webbrowser is not working in repl.it

I am using repl.it, and also the webbrowser module to open a link using webbrowser.open("https://google.com/") But, my link doesn't work. Can you help me with this? import webbrowser webbrowser.open("https://google.com/", 2)
W D
  • 204
  • 1
  • 10
1
vote
4 answers

Cannot open an html file from python in a web browser - notepad opens instead

In python I am trying to plot a graph with the pygal package import pygal # First import pygal bar_chart = pygal.Bar() bar_chart.add('Fibonacci', [0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55]) bar_chart.add('Padovan', [1, 1, 1, 2, 2, 3, 4, 5, 7, 9,…
Goofball
  • 735
  • 2
  • 9
  • 27
1
vote
1 answer

Python download file in link

I want to open a link using python on same tab. I use web browser module but all open in default browser ,but I want to open in same browser and same current tab. webbrowser.open(URL) webbrowser.open_new_tab(URL)
1
vote
1 answer

GET Requests are not working in Flask

I am not able to pass data in Flask using GET Method. I testing using web browser and it is showing null from flask import Flask, request import sqlite3 import json app = Flask(__name__) @app.route('/test', methods=['GET']) def test(): name =…
Rahul Kumar
  • 2,184
  • 3
  • 24
  • 46
1
vote
1 answer

how to download files using pyqt5 webenginewidgets

I am learning pyqt5 and built a simple webbrowser in pyqt5 webengine . Now out of curiosity I want to know that is there a method by which I am able to download files using this minimalistic browser,Thanks in advance. import sys from PyQt5 import…
user7735544
1
vote
0 answers

Python webbrowser.open with mailto doesn't work for Chrome

When I try to use mailto: with the webbrowser Python module webbrowser.open_new("mailto:") a new browser window is opened with one tab but "mailto" is not run if the default browser for webbrowser is Chrome. (Alternative code with the same…
sunyata
  • 1,843
  • 5
  • 27
  • 41
1
vote
2 answers

Opening a link produces an empty page

I am trying the following: import webbrowser url = 'http://docs.python.org/' webbrowser.open_new_tab(url) The result is a new window that is empty (the url does not get entered in the address line). The browser is Chrome (version 53.0.2785.92,…
AlwaysLearning
  • 7,257
  • 4
  • 33
  • 68
1
vote
1 answer

Python webbrowser - Check if browser is available (nothing happens when opening webpage over an SSH connection)

Is there a way to detect whether there is a browser available on the system on which the script is run? Nothing happens when running the following code on a server: try: webbrowser.open("file://" + os.path.realpath(path)) except…
Plasma
  • 1,903
  • 1
  • 22
  • 37
1
vote
1 answer

webbrowser.open('www.google.com') simply returns true and doesn't do anything else

I've looked online in numerous spots and it looks like I'm not the only person having this error on a mac running OS10.11.15 using python 3.5.2 and running the code in IDLE. The weird thing is it worked once and then didn't work after that. I've…
HNasser
  • 29
  • 4
1
vote
1 answer

how to terminate a thread which calls the webbrowser in python

I am developing an app which is linux based but right now I am facing as I have to call the webbrowser to do the further task but the problem is the program gets stuck and does not terminate. I have tried to terminate it using thread but it doesn't…
chinmay rakshit
  • 220
  • 3
  • 11
1
vote
0 answers

Python Webkit - Webcam Permissions

I have created a simple webkit program using python. The program loads a little web browser. Everything appears to work correctly, except webcam access. If I load a website that attempts to access the webcam (with JS getUserMedia() function) it…
alexward1230
  • 579
  • 3
  • 8
  • 25
1
vote
1 answer

Using requests/webbrowser to POST to browser?

I am making a program in Python 2.7 which I want to POST a URL to the browser. Here is my code which should explain it much better than I can: import requests, json, webbrowser pid = "AQ6723" size = "660" recaptcha = "" baseURL =…