415 questions
-3
votes
0
answers
77
views
Why webbrowser.open doesn't work with mcp server? [closed]
Short context: I’m building a local Python agent with a llama.cpp-backed 3B model and MCP-style tools. One tool should open a YouTube search in the browser.
What works
Tool is called
URL is ...
0
votes
0
answers
35
views
how to keep the focus of curser in terminal after opening a url through os/webbrowser.(python)
I'm on windows using vscode,
while True:
command = input("enter to next, 0 to append and next (or type 'e' to quit): ")
if command.lower() == 'e':
print("Exiting ...
0
votes
2
answers
353
views
Using Python, how to continue opening new URLs in a specific Edge window even if another Edge window is in the foreground?
Using this default model, if I separate one of these URLs in a new window and use it for reading, the next URL open will open in the window I've separated for reading, obviously hindering my reading.
...
0
votes
0
answers
134
views
Open a webpage popup window in Microsoft Edge browser using Python without Selenium
I can't use Selenium or any other type of option that controls the browser, because I need to use it on sites that have strict restrictions against bots and automations, so I need to use the browser ...
-1
votes
1
answer
50
views
Unable to start activity for android
I am programming python programs on a device that using android as an operation system ,and while I was trying to display HTML File using webbrowser library ,i have got this error as a text from the ...
0
votes
2
answers
157
views
Python Webbrowser not opening new window
From what I am reading Python webbrowser documentation you can either use Open() with a new=1 argument or using open_new() should open a new window. Not another tab.
I was working on a bigger project ...
1
vote
0
answers
56
views
How to connect firefox through existing opened browser?
I am using the below code to launch firefox browser, and then to connect to existing firefox browser
The problem is the control remains at
firefox_driver = webdriver.Firefox(service=service, options=...
-1
votes
2
answers
59
views
Webbrowser Module Doesn't Work with Lists
I'm new(ish) to Python, and am trying to create a link manager software. I have ran into an issue in my code, however: apparently, the webbrowser module doesn't work with lists?
I tried doing simple ...
1
vote
1
answer
72
views
Python webbrowser not opening in pop-up window
I am using Raspberry Pi 4 to run webbrowser.open(). But instead of open pop-up window, it show this in terminal. After choosing 'A', it shows the webpage content in terminal. How can I solve? I ...
0
votes
0
answers
83
views
How can I host a Python Web API built with Flask on IIS?
I have developed a Python-based Web API using frameworks such as Flask or FastAPI and need to deploy it on an IIS (Internet Information Services) server. The goal is to make the API accessible within ...
0
votes
2
answers
396
views
How is Python's webbrowser.open() method used on a Windows machine using a Linux subsystem?
Normally I work with Ruby and I don't have this issue thanks to some gems I have installed, but for Python I'm not sure how to handle this.
I'm on a Windows machine, and I develop with VS Code using ...
0
votes
0
answers
88
views
How can I use a compiled python code in pyscript?
I create a pyd compiled python file of a function called sm that calculate the sum of two numbers (just to test the use of compiled python file). The compiled file name is somme.pyd
To test I create ...
-3
votes
3
answers
105
views
How do I record the link of a web page and store it in a variable?
Basically in my project I open a web page using webbrowser and then type something into the search bar with pyautogui, which opens a new page. I need a function that finds the link of the new page and ...
1
vote
1
answer
52
views
webbrowser.open steals focus, how to avoid
On Windows, calling webbrowser.open steals the e.g. keyboard input focus, and sets it to the newly opened webbrowser tab.
Is there a way to avoid this, that is: to open the page in the background ?
0
votes
1
answer
24
views
Keep tab open after program end with webbrowser module
I'm trying to make a program that redirects the user to a HTML file after they have logged in. The redirecting part of the code works like this:
print("You have reached the end: Redirecting."...
0
votes
1
answer
44
views
why Django upload a file to server failed
if request.method == 'POST':
k = request.FILES
obj = request.FILES['upload']
t = int(time.time())
jobid = 'jobid'+str(t)
job_name = jobid + '_' + obj.name
print(job_name)
...
0
votes
1
answer
127
views
Need Help using webbrowser in python
I made an app that opens urls in a web browser, when you enter them into a gui.
from tkinter import *
import webbrowser
def WebOpen():
url = (WebEntry.get())
webbrowser.open(url)
gui = Tk()
...
0
votes
0
answers
58
views
How can I open the same page in Chrome without opening a new page webbrowser python
i do not need to open new page in chrome, I have to use the same existing page
I am trying to send WhatsApp messages using Python from the web, but every time it opens a new page and downloads ...
0
votes
2
answers
704
views
i am trying to create a windows webviewer in pyhton, i tried python webview but i always get a module error
why is it that my python webview code does not work
import webview
webview.create_window("Ridola Web View", "www.google.com")
webview.start()
Giving me this error
Traceback (most ...
0
votes
0
answers
245
views
vps ubuntu python could not locate runnable browser
i trying to run google Oauth with django project on vps ubuntu server
the google flow file use python module webbrowser.py ,
when run the app get error "could not locate runnable browser"
...
1
vote
0
answers
82
views
Python webbrowser search with default search engine
Trying to determine how I would use pythons webbrowser library to search a string on the USERS set search engine.
My current line is
wb.open_new(f"https://www.google.com/search?q={string}")
...
0
votes
0
answers
87
views
Python request.get() is not following redirects
I am trying to use the spotify api which uses OAuth. Once you have been authorized, accessing the authorization url redirects you to your specified redirect_uri with a code in the URL parameters. When ...
0
votes
1
answer
90
views
Binding columns with a table in SQLAlchemy
I have been trying to build up a webpage using Flask.I am currently on the login form:
from flask import Flask,render_template,request
from flask_sqlalchemy import SQLAlchemy
app = Flask(__name__)
...
0
votes
0
answers
261
views
Python: webbrower and missing `GLIBCXX_3.4.29'
I came across an import problem causing a runtime warning at debug time.
As soon as my python script invokes the open method of the webbrowser package, VSCode prints the following:
/snap/core20/...
1
vote
1
answer
2k
views
Docker: "webbrowser.Error: could not locate runnable browser"
My Docker configuration:
FROM python:3.11
WORKDIR /app
COPY /app .
RUN pip install --upgrade pip && \
pip install --no-cache-dir -r requirements.txt && \
rm requirements....
0
votes
1
answer
678
views
How to prevent subprocess.run() (python 3.11) from waiting to close Edge browser to go next command
Previously, subprocess.run() still only opened the Edge browser and executed the next command without closing Edge. Currently, subprocess.run() will wait for Edge to close before executing the next ...
0
votes
0
answers
59
views
Automate the following Python functions
I have created the following script in tkinter. The initial outcome of the script that I am trying to achieve is for each on the following functions to automate with very little manual effort. For ...
-1
votes
1
answer
62
views
re.findall picking up only second digit of a two digit number in a web page [duplicate]
I am trying to parse an HTML Page using Regualr Expressions. I have to find out the sum of all comments from this web page: https://py4e-data.dr-chuck.net/comments_42.html
Everything else is working ...
-2
votes
2
answers
72
views
How to get the url of the site you are currently on for parcing in real time?
To parse the site, I need to collect information in real time from the page I am on. And I need to get a link, which is always completely different. I did this through the mouse library and keyboard, ...
0
votes
1
answer
1k
views
How to run html code in python with web output using vscode
I know you guys will remove this question, cause this has been asked, but i can really not understand this question!! Stack overflow has been useless for me due to you guys rejecting my questions even ...
1
vote
0
answers
978
views
streamlit " error is not recognized as cmdlet name"
am trying to build a streamlit web app i have installed streamlit in my anaconda environment with the command :
conda create --name streamlit_env python=3.10
conda activate streamlit_env
pip install ...
0
votes
2
answers
779
views
Flask app not updating fetched data from database without restart
I'm having a problem with my Flask app where it doesn't update the data fetched from the database when I insert new data. The app only fetches the old data that was fetched when I started the app. No ...
0
votes
1
answer
45
views
program which takes any domain name as an input and search it on the browser
import webbrowser
a = str(input("Enter Your Website : ..."))
print(a)
print('Searching '+ a)
webbrowser.open(a)
The problem is that it is opening in Firefox, but my default browser is ...
1
vote
0
answers
33
views
Problem with inserting a string into the python webbrowser
I am trying to write a progam that is supposed to open random links in my browser, using the webbrowser module and the random module. I am also using a .txt file where all the links are saved.
I have ...
1
vote
0
answers
153
views
Can't open web browser with webbrowser module
I'm trying to open an url using python webbrowser module. When the code below runs nothing happens.
import webbrowser
webbrowser.open_new('http://www.python.org')
But when a sleep time is given, the ...
-1
votes
1
answer
765
views
Is there a way to get the page content from the loaded webpage using Webbrowser module (Python)
Is there a way so I can get the page content from the page I launch using:
import webbrowser
url = 'http://docs.python.org/'
# MacOS
#chrome_path = 'open -a /Applications/Google\ Chrome.app %s'
# ...
2
votes
1
answer
100
views
For loop in WebBrowser module doesn't work
I have some links in a list and I need to open all these links in my browser
import webbrowser
browserpath='C:\Program Files (x86)\Google\Chrome\Application\chrome.exe %s'
lis=[ITS FILLED WITH LINK ...
0
votes
1
answer
241
views
My pyscript is not loading whenever i run the live server it downloads the pyodide.tar
Its stuck here
I tried Downloading the pyodide but is still gives error of
0
votes
1
answer
58
views
Problem in opening link via python webbrowser
When I send the GET request via postman there is an option to send and download and the download file(an html file) is executable which opens In a browser.
I wish to do the same via python via ...
0
votes
1
answer
180
views
How can i append a URL into Tkinter button?
I am new to Python and coding and i am trying to make an object detection application. For this i have used a loop which will print out buttons for the objects that was detected. For example if we ...
0
votes
1
answer
536
views
Python Selenium Safari
I don't understand how this works:
If I open a website by hand in for example Safari or Chrome, I can log me on and if I close the browser I automatically log in after reopen the browser. So I once ...
0
votes
1
answer
114
views
Find driver element with Python
I am trying to download a file from MS Edge. The webpage is protected by a username and a password. I am able to open up MS Edge, and navigate to the appropriate page, however, I can't navigate the ...
0
votes
0
answers
21
views
How can ı fix error of TypeError: startfile: filepath should be string, bytes or os.PathLike, not tuple [duplicate]
I assigned the website link I got from the database to a variable and I want to open this variable with the webbrowser module, but it gives an error
connection = mysql.connector.connect(host="...
0
votes
1
answer
2k
views
Use Python to launch and track Chrome browser (on Windows), open new tabs, then close everything when done
I needed to launch Chrome programmatically, then open some more tabs, then close them all when I was done, even if an existing Chrome browser was already open. I could find partial answers, but ...
-1
votes
1
answer
1k
views
Python Web browser click listener
Is there any packages or ways to detect what is being clicking in a web browser? I mean get tag/xpath from the web browser (of what is being clicked)? To afterwards find it via selenium or similar?
Or ...
0
votes
2
answers
121
views
webbrowser.open(site) doesn't process korean characters
I'm quite an infrequent coder, I hope my question won't be too obvious.
I have this very simple code to open some websites based on string (open website for a specific word) which works on Windows but ...
0
votes
1
answer
260
views
Python start browser with current user directory on Windows [duplicate]
I want to open web browser with url my python script.
I have a more than 100+ user. I want to run the my python script with every user desktop portable chrome for ex. C:\Users\user1\Desktop\chrome\...
0
votes
0
answers
350
views
Getting "IndexError: list index out of range " error
I am trying to get my followers and the followers of my followers to make a graph for a project
Below is the function that i get the error from. The error from the followers[1].click().
I tried ...
0
votes
1
answer
137
views
Web Browser Module - Can't Loop through a list of URLs with 'for' Loops
I have the following code which will import a .txt file with a list of urls that, with the for statement, I'd like open one by one. Unfortunately webbrowser won't open the link by one by one, but it ...
9
votes
2
answers
13k
views
Error "tcgetpgrp failed: Not a tty" using python3 to open web browser
Here's the breakdown of my Windows WSL environment:
Windows 11
WSL version 2
Ubuntu version 20.04.3 LTS
Python 3.8.10
I have a super simple Python program I'm using to open a web page in my default ...