This is real world program which blocks certain distracting website like Facebook, Youtube etc during your work hours.
What we are going to in this program is that we will pass the link of websites which you think is distracting and the the time that you are working on your computer and program will block those website.
Every system have host file whether it is Mac, Windows or Linux.
/etc/hosts
C:\Windows\System32\drivers\etc
Working of host file: Host is an operating system file which maps hostnames to IP addresses. In this program we will be mapping hostnames of websites to our localhost address. Using python file handling manipulation we will write the hostname in hosts.txt and remove the lines after your working hours.
Windows user need to create a duplicate of OS’s host file. Now provide the path of the duplicate file in hosts_path mentioned in the script.
Run website_blocker.pyw file.
git clone https://github.com/SaquibAnwar/Website-Blocker-Using-Python.git