{"id":19520261,"url":"https://github.com/jalfr3d/simple-website-blocker","last_synced_at":"2026-04-20T19:33:04.996Z","repository":{"id":154427241,"uuid":"613603850","full_name":"jalfr3d/simple-website-blocker","owner":"jalfr3d","description":"A simple script to block websites urls in a windows system","archived":false,"fork":false,"pushed_at":"2023-11-20T18:59:35.000Z","size":6,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-11-18T19:23:49.184Z","etag":null,"topics":["python","python-script","timed-website-blocker","website-blocker","website-blocker-python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jalfr3d.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-03-13T22:39:19.000Z","updated_at":"2023-11-20T19:00:06.000Z","dependencies_parsed_at":null,"dependency_job_id":"2af15ab9-b731-407d-8889-eba9ae4b8924","html_url":"https://github.com/jalfr3d/simple-website-blocker","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jalfr3d/simple-website-blocker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jalfr3d%2Fsimple-website-blocker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jalfr3d%2Fsimple-website-blocker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jalfr3d%2Fsimple-website-blocker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jalfr3d%2Fsimple-website-blocker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jalfr3d","download_url":"https://codeload.github.com/jalfr3d/simple-website-blocker/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jalfr3d%2Fsimple-website-blocker/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32062480,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-20T11:35:06.609Z","status":"ssl_error","status_checked_at":"2026-04-20T11:34:48.899Z","response_time":94,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["python","python-script","timed-website-blocker","website-blocker","website-blocker-python"],"created_at":"2024-11-11T00:24:41.701Z","updated_at":"2026-04-20T19:33:04.977Z","avatar_url":"https://github.com/jalfr3d.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Website Blocker\n\n## Overview\n\nThis repository contains a simple Python script that allows you to block access to specific websites during certain time periods. The script modifies your computer's host file to restrict access to the specified websites during working hours and restores access during non-working hours.\n\n## How It Works\n\nThe website blocker script operates as follows:\n\n- You provide a list of websites (URLs) that you want to block in the `website_lists` variable.\n- During working hours (configured as 8 AM to 8 PM by default), the script modifies the host file to redirect the specified websites to `127.0.0.1`, effectively blocking access to them.\n- During non-working hours, the script restores access to the blocked websites by removing the entries from the host file.\n\n## Configuration\n\nTo configure the script for your specific needs, follow these steps:\n\n1. Open the script in a text editor or Python IDE.\n\n2. Modify the `website_lists` variable to include the websites you want to block. For example:\n\n   ```python\n   website_lists = [\"www.facebook.com\", \"facebook.com\", \"es-la.facebook.com\"]\n   \n3. You can adjust the working hours by changing the time range in the following section of the script:\n```\nif dt(dt.now().year, dt.now().month, dt.now().day, 8) \u003c dt.now() \u003c dt(dt.now().year,\n                                                                    dt.now().month, dt.now().day, 20):\n```\nBy default, it is set to block websites from 8 AM to 8 PM.\n\n4. Save your changes.\n\n## Usage\nClone this repository to your local machine or download the script.\n\nRun the script (e.g., python website_blocker.py) as an administrator or with elevated privileges since it modifies system files.\n\nThe script will automatically block the specified websites during the defined working hours and unblock them during non-working hours.\n\nTo exit the script, you can press Ctrl + C or close the terminal.\n\n## Notes\nMake sure to run the script with administrative privileges to modify the hosts file.\n\nBe cautious when modifying the hosts file, as it can affect the behavior of your computer. Only block websites that you genuinely want to restrict access to.\n\nYou can add or remove websites from the website_lists variable to customize the list of blocked websites.\n\nThat's it! Use this website blocker script to increase productivity during your working hours by blocking distracting websites.\n\n## License\n\nThis project is licensed under the MIT License. You are free to use and modify the code for your own purposes.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjalfr3d%2Fsimple-website-blocker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjalfr3d%2Fsimple-website-blocker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjalfr3d%2Fsimple-website-blocker/lists"}