{"id":19684228,"url":"https://github.com/elliotwutingfeng/take_a_shot","last_synced_at":"2026-05-03T15:35:06.309Z","repository":{"id":170766671,"uuid":"647001986","full_name":"elliotwutingfeng/take_a_shot","owner":"elliotwutingfeng","description":"Capture screenshot and/or HTML source code data of any given webpage and print it to stdout.","archived":false,"fork":false,"pushed_at":"2026-02-20T09:00:25.000Z","size":124,"stargazers_count":1,"open_issues_count":2,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-20T12:47:58.740Z","etag":null,"topics":["chromedriver","docker","html","javascript","osint","screenshot","selenium","source-code"],"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/elliotwutingfeng.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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":"2023-05-29T21:01:11.000Z","updated_at":"2026-02-20T08:59:56.000Z","dependencies_parsed_at":"2023-10-16T07:17:37.148Z","dependency_job_id":"ecd0a161-3483-4db3-9870-b99080ba5177","html_url":"https://github.com/elliotwutingfeng/take_a_shot","commit_stats":null,"previous_names":["elliotwutingfeng/takeashot","elliotwutingfeng/take_a_shot"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/elliotwutingfeng/take_a_shot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elliotwutingfeng%2Ftake_a_shot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elliotwutingfeng%2Ftake_a_shot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elliotwutingfeng%2Ftake_a_shot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elliotwutingfeng%2Ftake_a_shot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/elliotwutingfeng","download_url":"https://codeload.github.com/elliotwutingfeng/take_a_shot/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elliotwutingfeng%2Ftake_a_shot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32575112,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-03T06:36:36.687Z","status":"ssl_error","status_checked_at":"2026-05-03T06:36:09.306Z","response_time":103,"last_error":"SSL_read: 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":["chromedriver","docker","html","javascript","osint","screenshot","selenium","source-code"],"created_at":"2024-11-11T18:17:10.869Z","updated_at":"2026-05-03T15:35:06.290Z","avatar_url":"https://github.com/elliotwutingfeng.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n  \u003ch3 align=\"center\"\u003eTake A Shot\u003c/h3\u003e\n  \u003cimg src=\"images/lens.svg\" alt=\"Lens\" width=\"200\" height=\"200\"\u003e\n\n  \u003cp align=\"center\"\u003e\n    Capture screenshot and/or HTML source code data of any given webpage and print it to stdout.\n  \u003c/p\u003e\n\n  \u003cp align=\"center\"\u003e\n    \u003cstrong\u003eOutput format:\u003c/strong\u003e JSON string containing b64-encoded data.\n  \u003c/p\u003e\n\n  \u003cp align=\"center\"\u003e\n  \u003ca href=\"https://python.org\"\u003e\u003cimg src=\"https://img.shields.io/badge/Python-FFD43B?style=for-the-badge\u0026logo=python\u0026logoColor=blue\" alt=\"Python\"/\u003e\u003c/a\u003e\n  \u003ca href=\"https://docker.com\"\u003e\u003cimg src=\"https://img.shields.io/badge/Docker-2CA5E0?style=for-the-badge\u0026logo=docker\u0026logoColor=white\" alt=\"Docker\"/\u003e\u003c/a\u003e\n  \u003ca href=\"https://google.com/chrome\"\u003e\u003cimg src=\"https://img.shields.io/badge/Google_chrome-4285F4?style=for-the-badge\u0026logo=Google-chrome\u0026logoColor=white\" alt=\"Google Chrome\"/\u003e\u003c/a\u003e\n  \u003c/p\u003e\n\n  \u003cp align=\"center\"\u003e\n  \u003ca href=\"LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/badge/LICENSE-MIT-GREEN?style=for-the-badge\" alt=\"MIT license\"/\u003e\u003c/a\u003e\n  \u003c/p\u003e\n\n\u003c/div\u003e\n\n## Implementation details\n\n- Uses Google Chrome in headless mode.\n- Works well even with vertically long webpages.\n- Webpages with fixed headers generally work well, but fixed footers may lead to unusual results.\n\nForked and modified from: \u003chttps://github.com/mokemokechicken/docker_capture_web\u003e\n\n## Requirements\n\nTested on the following environment\n\n### Linux\n\n- Linux 6.12\n- Docker Version 28.3.0\n\n## Usage\n\n### Build\n\n```bash\n./build\n```\n\nThen either run\n\n```bash\n./capture \u003cURL\u003e [options]\n```\n\nor alternatively run\n\n```bash\ndocker run --cap-drop=all --security-opt=no-new-privileges --rm elliotwutingfeng/take_a_shot \u003cURL\u003e [options]\n```\n\n## Output Format\n\n```json\n{\n  \"screenshot\": \"\u003cPNG screenshot as b64-encoded string\u003e\",\n  \"source_code\": \"\u003cHTML source code as b64-encoded string\u003e\"\n}\n```\n\n## Examples\n\n### Default User Agent\n\n```bash\ndocker run --cap-drop=all --security-opt=no-new-privileges --rm elliotwutingfeng/take_a_shot \"https://example.com\"\n```\n\n### Specify User Agent\n\n```bash\ndocker run --cap-drop=all --security-opt=no-new-privileges --rm elliotwutingfeng/take_a_shot \"https://example.com\" --window-size 390x844 --ua 'Mozilla/5.0 (iPhone; CPU iPhone OS 16_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) FxiOS/113.0 Mobile/15E148 Safari/605.1.15'\n```\n\n## Help\n\n```bash\nusage: takeashot.py [-h] [--screenshot] [--source-code]\n                    [--window-size WINDOW_SIZE] [--ua USER_AGENT]\n                    [--wait WAIT] [--lang LANG] [--language LANGUAGE] [-v]\n                    [--vv]\n                    url\n\npositional arguments:\n  url                   specify URL\n\noptions:\n  -h, --help            show this help message and exit\n  --screenshot          Take screenshot\n  --source-code         Extract source code\n  --window-size WINDOW_SIZE\n                        specify window size like 1200x800\n  --ua USER_AGENT       specify user-agent\n  --wait WAIT           specify wait seconds after scroll down\n  --lang LANG           set LANG environment variable\n  --language LANGUAGE   set LANGUAGE environment variable\n  -v                    set LogLevel to INFO\n  --vv                  set LogLevel to DEBUG\n```\n\n## Credits\n\n[More Information](CREDITS.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felliotwutingfeng%2Ftake_a_shot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felliotwutingfeng%2Ftake_a_shot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felliotwutingfeng%2Ftake_a_shot/lists"}