This can be done using, idle (Python 3.8 32-bit).
Step 1:Import time(The last number in the line 15 indicates the time).
Step 2:Give the path where you want to save the file(The file which states if the website is blocked).
Step 3:Follow the code in the file.
Step 4:When you run the program sometimes you might recieve the message as "Permission Denied".
Step 5:Make your command prompt as "Administrator" and run the code.
Step 6:Now to check if the file is blocked go to the file path and open it using notepad.
Step 7:You can find that the website has been blocked.
Step 8:Unblocking is just simple,Just change your time.