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

Why won't Python webbrowser module work properly?

Ok, some background info: I'm using the most recent version of Python 3 and Visual Studio Code. I'm on the most recent version of Windows 10 and all of my browsers are up to date. I've been trying to use the webbrowser() module of Python, but it…
GabeCodes
  • 125
  • 1
  • 1
  • 10
-2
votes
1 answer

Python Webbrowser anchors on Local html file

When trying to to use '#' to specify anchor point in a webpage using the webbrowser lib, it seem to only work on websites, and not on local html files webbrowser.open(https://docs.python.org/library/webbrowser.html#webbrowser.open) works,…
Tomas Berger
  • 173
  • 1
  • 3
  • 15
-2
votes
1 answer

How to check web browser URL | Python |

Is their any way to check particular URL in web browser I tried in this below format as well print(webbrowser.get('windows-default').open_new_tab('https://facebook.com) and the output is True but also open the url. Code : import webbrowser urls =…
Abrham
  • 25
  • 4
-2
votes
2 answers

Is there a way to use Python to open specific webpages after typing in input?

I'm trying to find a way to write a script that accepts input from the user, After which, it will open webpages. The code looks like this so far: jurisdiction = input("Enter jurisdiction:") if jurisdiction = 'UK': import webbrowser …
-2
votes
2 answers

Scraping data from website Python - After interaction

Hello guys! A friend of mine has to do a lot of typing for school in her IT classes. That means, she has to learn how to type fast on the keyboard. As lazy as she is, she asked me if i have any idea how she's able to type her texts on…
-2
votes
2 answers

How do I code my discord bot so that it can perform google search on the user device?

Is it possible to let my discord bot interact with its users? Before asking this question I've tried : import webbrowser import discord client = discord.client() @client.event async def on_message(message): if message.author == client.user: …
CopyrightC
  • 857
  • 2
  • 7
  • 15
-2
votes
1 answer

How to integrate this webbrowser code into tkinter?

This is the code I'm trying to integrate into Tkinter: import webbrowser chrome_path = 'C:/Program Files (x86)/Google/Chrome/Application/chrome.exe %s' post_url = input("enter your post url : ") download_url = "en.savefrom.net/"+…
-2
votes
2 answers

How to remove %20 from url in python?

How do I remove %20 from url in my code? elif 'launch' and 'open' in voice_note: print('opening...') start_url = "https://www." end_url = ".com" urllib.parse.unquote(voice_note) play_sound_from_polly('Displaying the result,…
-2
votes
3 answers

Error When Opening URL's from a text file

I am trying to make a program which opens an URL written in a text file. My program reads from the file and tries to open the url but gets the error TypeError: startfile: filepath should be string, bytes or os.PathLike, not list I have tried…
-2
votes
1 answer

Syntax error when trying to run server.py through command prompt

This is the code i am trying to run import socket s = socket.socket() print ("Socket successfully created") port = 12345 s.bind(('', port)) print ("socket binded to %s" %(port)) s.listen(5) …
-2
votes
1 answer

can i integrate a Python module into my own python code?

I am in the process of writing a quiz using simple Python as part of a project- ultimately to create an executable file that runs the quiz when opened (so the user doesn't have to manually run the code and potentially see answers to some of the…
Jeffster
  • 1
  • 2
-3
votes
1 answer

Unable to close browser using webbrowser module

Unable to close browser using python webbrowser. I don't know how to close it. Code is: elif 'open chrome' in query: Cpath = 'C:\\Users\\hi\\AppData\\Local\\Google\\Chrome\\Application\\chrome.exe' os.startfile(Cpath)
-3
votes
2 answers

is it possible to controll browse(any) using python ,

i am trying to control my browser using python, what I need is I give commands in terminal that should work on the browser like opening and searching for something(like scorling the bowser) and closing the browser currently I am done with opening…
-3
votes
1 answer

How to write a program which would help me to access to data with https in URL

Recently I've been using python to access to web pages with http as the protocol but it is getting out of my hands to access to web pages which have https as their host.Please can someone help to learn the right procedure to solve this error.
-3
votes
1 answer

How to expose python input() function in UI/web , to get input from client(user) and pass it back to server

How to expose python input() function in UI/web , to get input from client(user) and pass it back to server. Then do some calculation and pass it back to client(user). #Step 3 : I display his age back to UI Randomstate=1 LR_classifier =…
1 2 3
27
28