Skip to content

This is real world program which blocks certain distracting website like Facebook, Youtube etc during your work hours.

Notifications You must be signed in to change notification settings

SaquibAnwar/Website-Blocker-Using-Python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

Website-Blocker-Using-Python

This is real world program which blocks certain distracting website like Facebook, Youtube etc during your work hours.

About the program

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.

Program Architecture:

Every system have host file whether it is Mac, Windows or Linux.

Host file in Mac and Linux :

/etc/hosts

Host file in Windows:

C:\Windows\System32\drivers\etc

Getting Started

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.

Special note for Windows users

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.

How to run

Run website_blocker.pyw file.

Clone or download this repository

git clone https://github.com/SaquibAnwar/Website-Blocker-Using-Python.git

About

This is real world program which blocks certain distracting website like Facebook, Youtube etc during your work hours.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages