{"id":23552453,"url":"https://github.com/devsrv/py-crawler","last_synced_at":"2025-10-20T01:18:48.236Z","repository":{"id":269051109,"uuid":"906276165","full_name":"devsrv/py-crawler","owner":"devsrv","description":"A Python-based web crawler that systematically browses websites and generates a comprehensive CSV report of all discovered URLs along with their HTTP status codes","archived":false,"fork":false,"pushed_at":"2025-01-14T12:23:45.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-15T17:14:19.843Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/devsrv.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null}},"created_at":"2024-12-20T14:38:00.000Z","updated_at":"2025-01-14T12:23:48.000Z","dependencies_parsed_at":null,"dependency_job_id":"b7295058-f263-423f-a58a-92e361021361","html_url":"https://github.com/devsrv/py-crawler","commit_stats":null,"previous_names":["devsrv/py-crawler"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devsrv%2Fpy-crawler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devsrv%2Fpy-crawler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devsrv%2Fpy-crawler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devsrv%2Fpy-crawler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devsrv","download_url":"https://codeload.github.com/devsrv/py-crawler/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254384985,"owners_count":22062422,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-12-26T11:11:11.444Z","updated_at":"2025-09-22T18:15:36.228Z","avatar_url":"https://github.com/devsrv.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Web Crawler\n\nA Python-based web crawler that systematically browses websites and generates a comprehensive CSV report of all discovered URLs along with their HTTP status codes.\n\n## Features\n\n-   Crawls all pages within a specified domain\n-   Respects same-origin policy (only crawls URLs from the same domain)\n-   Generates a CSV report with URLs and their HTTP status codes\n-   Handles relative and absolute URLs\n-   Implements polite crawling with built-in delays\n-   Filters out non-web schemes and fragments\n-   Robust error handling for failed requests\n\n## Prerequisites\n\n-   Python 3.x\n\n## Installation\n\n1. Clone the repository:\n\n```bash\ngit clone \u003crepository-url\u003e\ncd \u003crepository-name\u003e\n```\n\n2. Create and activate a virtual environment:\n\n```bash\nsudo apt-get install python3-venv\npython3 -m venv venv\nsource venv/bin/activate\n```\n\n3. Install the required dependencies:\n\n```bash\npip install --upgrade pip\npip install -r requirements.txt\n```\n\n## Usage\n\n1. Run the script:\n\n```bash\npython index.py\n```\n\n2. When prompted:\n\n    - Enter the website URL you want to crawl (e.g., https://example.com)\n    - Specify the output CSV filename (e.g., links.csv)\n\n3. The crawler will:\n    - Start crawling from the provided URL\n    - Save discovered URLs to the specified CSV file\n    - Record HTTP status codes for each URL\n    - Print progress information to the console\n\n## Output Format\n\nThe script generates a CSV file with the following columns:\n\n-   `URL`: The discovered URL\n-   `Status_Code`: HTTP status code (only recorded if ≥ 300 or if the request failed)\n\n## Features in Detail\n\n### URL Processing\n\n-   Removes URL fragments (#) and query parameters (?)\n-   Converts relative URLs to absolute URLs\n-   Validates URLs against the original domain\n\n### Rate Limiting\n\n-   Implements a 1-second delay between requests to prevent server overload\n\n## Contributing\n\nFeel free to submit issues and enhancement requests.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevsrv%2Fpy-crawler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevsrv%2Fpy-crawler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevsrv%2Fpy-crawler/lists"}