414 questions
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
0
answers
130
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 ...
0
votes
2
answers
141
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
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 ...
0
votes
0
answers
76
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
0
answers
81
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 ...
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
34
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
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
0
answers
239
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"
...
0
votes
0
answers
86
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
0
answers
256
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/...
0
votes
1
answer
668
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 ...
-1
votes
1
answer
55
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 ...
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 ...
0
votes
2
answers
776
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 ...
1
vote
0
answers
27
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
votes
1
answer
760
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'
# ...
0
votes
1
answer
236
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
172
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
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
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 ...
0
votes
2
answers
116
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
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 ...
9
votes
2
answers
12k
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 ...