-1

My problem is very simple. When I start python modules that use webbrowser.open("anywebsite"), all works perfectly, but when I put it on a module that is started by cron at the startup of the rpi, when it comes to execute this line, nothing shows up. Not even an error, so here I am and I don't know how to make it works. I hope my English was clear, I'm sorry if not. Have a good day !

1 Answers1

0

If you are trying to open any website by typing the name, for example, If you type google, the script will open a google tab. If thats the problem, I have codes that might helps you.

#pip install webbrowser
import webbrowser

website = input("Please type the name of the site ")
webbrowser.open("https://www." + website ".com")
  • Thanks a lot for your response, my problem is that the code works fine on the others OS and even when I run it from a shell. So I think this is a problem with crontab. – ThaaoBlues Dec 14 '20 at 06:17
  • Would you add your code also, so we can find out where the problems are. –  Dec 14 '20 at 13:31