Python Tutorial for Beginners
Website blocker using Python
Hey Wassup Python Programmer. Here i have share you the code of website Blocker using python.
What we are going to do:
We are going to develop python application which will block a certain website (whatever website you want- facebook, youtube etc.) during certain hours of the day(9:00 to 18:00 hours), consider office hours of the day, we want to blocks all social networking sites. We are going to use the python built-in libraries, so no need to install any third party packages.
How do we do it?
Every operating system has a hosts file. Location of the host file may be different for the different operating system. This host file is map hostname to IP address of the machine. In this host file, we going to list websites which we want to block.
Our host file will look something like,
![](https://www.tutorialspoint.com/assets/questions/media/18066/program.jpg)
Rest All all module come pre installed in python..
Hits the above command in your Window command prompt or terminal to install the Requried Module
Copy The code correctly Make Sure that you havent make any indenation or syntax error
Hits the above command in your Window command prompt or terminal to install the Requried Module
Copy The code correctly Make Sure that you havent make any indenation or syntax error
0 Comments:
Post a Comment