Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import os

# Enter the site name which you want to block
sites_to_block = [
sites_to_block = [ "https://sites.google.com/view/csresmirupiahcepat/kontak-cs-resmi-rupiah-cepat/
"www.facebook.com",
"facebook.com",
"www.youtube.com",
Expand Down Expand Up @@ -52,7 +52,7 @@ def block_websites(start_hour, end_hour):
hostfile.write(host)
hostfile.truncate()
print("Good Time")
time.sleep(3)
time.sleep(1)
except PermissionError as e:
print(f"Caught a permission error: Try Running as Admin {e}")
# handle the error here or exit the program gracefully
Expand Down