{"id":37066657,"url":"https://github.com/timf34/pagesource","last_synced_at":"2026-01-14T07:49:29.184Z","repository":{"id":331011985,"uuid":"1124841507","full_name":"timf34/pagesource","owner":"timf34","description":"CLI to download websites' actual JS/CSS/assets (not flattened HTML)","archived":false,"fork":false,"pushed_at":"2025-12-30T14:45:06.000Z","size":1222,"stargazers_count":34,"open_issues_count":0,"forks_count":2,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-02T00:20:00.101Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://pypi.org/project/pagesource/","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/timf34.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-12-29T17:53:19.000Z","updated_at":"2026-01-01T23:01:12.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/timf34/pagesource","commit_stats":null,"previous_names":["timf34/pagesource"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/timf34/pagesource","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timf34%2Fpagesource","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timf34%2Fpagesource/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timf34%2Fpagesource/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timf34%2Fpagesource/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/timf34","download_url":"https://codeload.github.com/timf34/pagesource/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timf34%2Fpagesource/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28413502,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T05:26:33.345Z","status":"ssl_error","status_checked_at":"2026-01-14T05:21:57.251Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":[],"created_at":"2026-01-14T07:49:28.630Z","updated_at":"2026-01-14T07:49:29.164Z","avatar_url":"https://github.com/timf34.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pagesource\n\nA Python CLI tool that captures all resources loaded by a webpage (like browser DevTools Sources tab) and saves them with the original directory structure.\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"assets/explainer.png\" alt=\"Explainer diagram\" width=\"600\"\u003e\n\u003c/div\u003e\n\n## Installation\n\n```bash\npip install pagesource\n\n# IMPORTANT: Install Playwright browser after package installation\nplaywright install chromium\n```\n\n## Usage\n\n### Basic Usage\n\n```bash\n# Capture all resources from a webpage\npagesource https://example.com\n```\n\nThis will save all resources to `./pagesource_output/` with the directory structure preserved.\n\n### Options\n\n```bash\n# Specify custom output directory\npagesource https://example.com -o ./my-output\n\n# Wait extra time for JavaScript content (useful for SPAs)\npagesource https://example.com --wait 5\n\n# Include external resources (CDN assets, third-party scripts)\npagesource https://example.com --include-external\n\n# Combine options\npagesource https://example.com -o ./output --wait 3 --include-external\n```\n\n### CLI Reference\n\n```\npagesource \u003curl\u003e [OPTIONS]\n\nArguments:\n  url                     URL of the webpage to capture resources from\n\nOptions:\n  -o, --output PATH       Output directory (default: ./pagesource_output)\n  -w, --wait INTEGER      Additional seconds to wait after page load\n  -e, --include-external  Include external resources (CDN, third-party)\n  -v, --version           Show version and exit\n  --help                  Show help message\n```\n\n## Output Structure\n\nResources are saved preserving the URL path structure:\n\n```\npagesource_output/\n└── example.com/\n    ├── index.html\n    ├── assets/\n    │   ├── css/\n    │   │   └── style.css\n    │   └── js/\n    │       └── app.js\n    └── images/\n        └── logo.png\n```\n\nIf `--include-external` is used, external resources are saved in their own host directories:\n\n```\npagesource_output/\n├── example.com/\n│   └── ...\n├── cdn.example.com/\n│   └── libs/\n│       └── library.js\n└── fonts.googleapis.com/\n    └── css/\n        └── font.css\n```\n\n## Features\n\n- Captures all network resources loaded by the page (HTML, CSS, JS, images, fonts, etc.)\n- Preserves original directory structure\n- Handles query strings (strips them from filenames)\n- Infers file extensions from Content-Type when missing\n- Handles duplicate filenames\n- Sanitizes paths for filesystem safety\n- Optional wait time for JavaScript-heavy pages\n\n## Requirements\n\n- Python 3.10+\n- Playwright (with Chromium browser)\n\n## License\n\nMIT","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimf34%2Fpagesource","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftimf34%2Fpagesource","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimf34%2Fpagesource/lists"}