Hi! You can use the sleep function in the time module to pause the execution of a program for 10 seconds. You can do this between two different calls to the webbrowser module in a script. For more information about how to use the sleep function, you can check out: www.programiz.com/python-programming/time/sleep
Hi. You can open any link with the webbrowser model, so if you have a PDF shared on a public URL, then this is possible. If you are thinking about opening a PDF file that you have locally on your computer, then this is not possible with the webbrowser module.
Is is possbile to just simply get a line of text using this module? for instance the view count of this video and print it as a string? Or would you need something like selenium/requests
import pyautogui as py py.hotkey("ctrl","w") what you are doing here is performing chrome tab closing shortcut programatically I'm interested in automation stuff and came across this...this might help you
@@pyguy1688 thanks, but you are Little too late lol, inlm using the keyboard library to do that btw, recommend for writing words, using hotkeys and f (f1, f2, f3, f4,f5...) keys
Selenium can do a lot more than the webbrowser module. On the other hand, the webbrowser module works for simple stuff and does not require an external package download :)
Hi Chaitanya, As far as I understand the Brave browser is simply a browser with added privacy features. There is a function in the web-browser library called register (see the docs docs.python.org/3/library/webbrowser.html) where you can register other browsers than the most standard ones. Hopefully this sets you on the right track :)
they would need to have python installed, and then you need to somehow convince them to press the run button... which would make them suspicious. OR, you could try converting the file into a .exe , and then make a shortcut of it, hide the original .exe somewhere, and edit the shortcut to make it look normal.
its so simple but i can see it being so useful
Is there any way to do the same thing in golang?
Probably yes, but I am unfortunately not that familiar with golang :S
What if I want to open a URL and after let's say 10 seconds I want to open another one? How can I do this?
Hi! You can use the sleep function in the time module to pause the execution of a program for 10 seconds. You can do this between two different calls to the webbrowser module in a script. For more information about how to use the sleep function, you can check out: www.programiz.com/python-programming/time/sleep
@@TMQuest Perfect! Thank you very much
Cool, my bro. Thanks a lot.
can we open pdf that store in directory using webbrowser
Hi. You can open any link with the webbrowser model, so if you have a PDF shared on a public URL, then this is possible. If you are thinking about opening a PDF file that you have locally on your computer, then this is not possible with the webbrowser module.
@@TMQuest thank u for ur reply
Thanks bro....
Is is possbile to just simply get a line of text using this module? for instance the view count of this video and print it as a string? Or would you need something like selenium/requests
I think e.g. requests would be a better approach for this :)
Is it possible to add in a layout while using say frameworl like pyqt
That should be possible :)
thanks
How do you close it man, please help me how tf do you close it??????
You can not close the website with the web-browser module, unfortunately.
import pyautogui as py
py.hotkey("ctrl","w")
what you are doing here is performing chrome tab closing shortcut programatically
I'm interested in automation stuff and came across this...this might help you
@@pyguy1688 thanks, but you are Little too late lol, inlm using the keyboard library to do that btw, recommend for writing words, using hotkeys and f (f1, f2, f3, f4,f5...) keys
Is it possible to run the url in background whenever it is called in code
Hi. As far as I know, this is unfortunately not possible in webbroser :(
What's the difference from using the selenium module?
Selenium can do a lot more than the webbrowser module. On the other hand, the webbrowser module works for simple stuff and does not require an external package download :)
Sir basically I want to open RUclips through Brave browser but all videos on RUclips are showinghow to open through web browser pls help......
Hi Chaitanya,
As far as I understand the Brave browser is simply a browser with added privacy features. There is a function in the web-browser library called register (see the docs docs.python.org/3/library/webbrowser.html) where you can register other browsers than the most standard ones. Hopefully this sets you on the right track :)
Or set brave to your default browser
Is there a way to send this to someone, so it will do it to them? Been thinking of pranking some friends :)
Then you would have to send the Python file to them and ask them to open it, which kind of ruins the fun maybe :)
they would need to have python installed, and then you need to somehow convince them to press the run button... which would make them suspicious.
OR, you could try converting the file into a .exe , and then make a shortcut of it, hide the original .exe somewhere, and edit the shortcut to make it look normal.
I don't know why would you go to such extremes just to prank a friend that may not work, but I don't care, go prank if you want.