-4

Im new to python and programming and wanted to make a simple program that opens a webpage after its execution, how can it be made?

rlolyiyo2
  • 1
  • 1
  • https://stackoverflow.com/a/4217032/6328256 – Sash Sinha May 15 '22 at 17:57
  • Welcome to Stack Overflow! Please visit [help], take [tour] to see what and [ask]. Do some research, search for related topics on SO; if you get stuck, post a [mcve] of your attempt, noting input and expected output, preferably in a [Stacksnippet](https://blog.stackoverflow.com/2014/09/introducing-runnable-javascript-css-and-html-code-snippets/) – mplungjan May 15 '22 at 18:03
  • It's in the standard library: https://docs.python.org/3/library/webbrowser.html – mkrieger1 May 15 '22 at 18:06

2 Answers2

0

Yes, the most common way to do this is with selenium and a webdriver manager. If you don't need to open the whole webpage and just need the HTML, use beautifulsoup4 and requests.

Hunter Boyd
  • 165
  • 10
0

Depends on what you mean with make python open a webpage. You can either call your default browser to open the URL with something like the following:

firefox.exe <url>

Or you can create an application using QT to show the webpage in "plain" Python: https://pythonspot.com/pyqt5-webkit-browser/

If you need to interact with the page through your program, see the links in the answer mentioning selenium.