Website Blocker is a simple Python script that blocks specified websites during working hours to increase productivity.
- Author: EmyCodes
This project is licensed under the MIT License.
-
Open a terminal.
-
Clone this repo
git clone https://github.com/EmyCodes/web-blocker.git
-
Navigate to the project directory:
cd ~/Desktop/web-blocker
-
Run the script:
python3 blocker.py
-
Open a command prompt.
-
Clone this repo
git clone https://github.com/EmyCodes/web-blocker.git
-
Navigate to the project directory:
cd C:\Users\emycodes\Desktop\web-blocker
-
Run the script:
python blocker.py
To run the script at system startup, follow these steps:
-
Open a terminal.
-
Type the following command to open the crontab editor (you may use super priviledge):
sudo crontab -e
-
Add the following line to run the script at startup:
@reboot python3 /path/to/blocker.py
-
Save and exit the editor.
- Create a shortcut for
blocker.py
. - Press
Win + R
to open the Run dialog. - Type
shell:startup
and press Enter. - Move the shortcut to this folder.
Now, the script will run automatically at system startup.
Edit the src/web_to_be_blocked.py
file to add or remove websites from the blocklist.
If you want to contribute to this project, feel free to open an issue or submit a pull request.
Special thanks to EmyCodes for creating this project.