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
3 answers

I have a program that opens websites, and I set my default browser to google chrome, but it still uses Internet Explorer

This is what I have so far. Do I need to change anything to make webbrowser package use Google Chrome? import webbrowser web = input('What website would you like to open? i.e. pbskids.org') webbrowser.open(web)
1
vote
2 answers

Python webbrowser.open() not working in VS Code

I am trying to open a webpage using Python, and my editor is VS Code. This is the code: import webbrowser webbrowser.open('google.com') This won't work while using VS Code, but it does work when I'm using IDLE. What am I misunderstanding? What…
1
vote
1 answer

How to scrape svg images with web scraper?

I want to scrape the images (they are in .svg format) from this website https://endoca.com/ ) for the images I want to download. However, when I download the files, they are downloaded but shows as invalid images. Can someone here help me if this…
1
vote
2 answers

How to open a secret tab in Chrome?

Using webbrowser module and webbrowser.open method, we can open URL in new tab. However, is there any way we can open a secret tab in Google by using Python? import webbrowser webbrowser.open_new("http://google.com")
Constant
  • 29
  • 5
1
vote
1 answer

Python for loop, webbrowser

I want to copy and paste some link (I tell it, how much), into this console program, and this will open it for me. I created a for loop so it will ask for a link (once if I typed 1...). But it is trying to execute and open the link every time when I…
1
vote
1 answer

Open one tab at a time _python-webbrowser

I'm am working on my first attempt writing a program that opens a Wikipedia page based on year entered, but each time I run the program, the tabs open for every year I have listed so far. I have tried writing it as a for loop, while loop, and…
1
vote
1 answer

how to open html file automatically using webbrowser package in python

I have a python script that use pandas and create dataframe from csv file and i want to display the dataframe information using pandas-profiling package and show the report in the browser once the user run the function . But the system does not…
Georges
  • 29
  • 8
1
vote
0 answers

How do I close internet tabs with python

Hello I am using gtts speech recognition and get audio to create a voice assistant like Alexa (this is why I named her Alex) and I am working on searching the web using the webbrowser module. Here it opens a website that says the weather in my…
crvcio
  • 321
  • 2
  • 5
  • 11
1
vote
1 answer

How to assign a function to a kivyMD button

I'm new to kivy and kivymd and I have a problem with it. The thing is that I need to assign a function to a KivyMD RectangleFlatButton to open a website, but I don't know how to do that. Please show me how. Here's what I have tried; from kivy.lang…
Poornaka
  • 180
  • 1
  • 13
1
vote
1 answer

How to use input function with flask in Python, to capture user input and then send response based on that response. Like dialogue-flow

How to use input function with flask in Python, to get a user input and then send response based on that response. Trying to do this continuously something like dialogue-flow approach . Trying to expose this command line terminal to capture user…
1
vote
1 answer

PyWinAuto: Process not found

I am trying to automate saving each tab in my open browser (Google Chrome). This code used to work before when it operated from the command prompt, but now I am making a GUI to use the functions and I get this error. here is the function that uses…
CodingBoy
  • 39
  • 1
  • 9
1
vote
2 answers

why is nothing getting parsed in my web scraping program?

I made this code to search all the top links in google search. But its returning none. import webbrowser, requests from bs4 import BeautifulSoup string = 'selena+gomez' website = f'http://google.com/search?q={string}' req_web =…
user9387061
1
vote
1 answer

How do I open a URL in Google Chrome in new tab using Python?

I am using the below code to open a new chrome browser window.When i run the code it is always opening a new page in the existing tab. import webbrowser import pyautogui url = 'google.com' chrome_path = r'C:\Program Files…
Prabhu Rajan
  • 11
  • 1
  • 2
1
vote
1 answer

How to let python detect when a certain file is being saved/closed?

I made this program that lets the user input what they want to download. It then opens up a browser and YouTube with the keywords the user input. The user can copy and pastes as many URLs to the text file url.txt. Simply save the text file, press…
Red
  • 26,798
  • 7
  • 36
  • 58
1
vote
1 answer

The following code is running through python IDE but not from CMD or by direct execution

import webbrowser import pyautogui import time webbrowser.open("https://meet.google.com/huq-etkk-pwv",new=0,autoraise=True) #auto_input time.sleep(10) pyautogui.hotkey('ctrl','d') pyautogui.hotkey('ctrl','e') time.sleep(2) #custom coordinates are…