{"id":21499196,"url":"https://github.com/twiny/screenshot","last_synced_at":"2025-07-15T21:31:18.641Z","repository":{"id":107047142,"uuid":"380379372","full_name":"twiny/screenshot","owner":"twiny","description":"A small HTTP server that takes a screenshot of a web page.","archived":false,"fork":false,"pushed_at":"2021-09-21T08:36:14.000Z","size":18,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-06-20T03:36:17.010Z","etag":null,"topics":["chromium","golang","screenshot"],"latest_commit_sha":null,"homepage":"","language":"Go","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/twiny.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":"2021-06-26T00:10:43.000Z","updated_at":"2023-03-28T06:06:34.000Z","dependencies_parsed_at":null,"dependency_job_id":"0544349c-5572-4298-bdcb-2afb5d233f3f","html_url":"https://github.com/twiny/screenshot","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/twiny%2Fscreenshot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/twiny%2Fscreenshot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/twiny%2Fscreenshot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/twiny%2Fscreenshot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/twiny","download_url":"https://codeload.github.com/twiny/screenshot/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226071048,"owners_count":17569103,"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":["chromium","golang","screenshot"],"created_at":"2024-11-23T17:14:47.127Z","updated_at":"2024-11-23T17:14:47.789Z","avatar_url":"https://github.com/twiny.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ScreenShot\n\nA small HTTP server that takes a screenshot of a web page.\n\nusing [Chromium](https://github.com/chromedp/chromedp) to capture the screenshot and [BBolt](https://go.etcd.io/bbolt) to cache images.\n\n# Install \u0026 Usage\n - Download\n```\ngit clone https://github.com/twiny/screenshot\n```\n - Install\n```\ngo build -o bin/screenshot -v cmd/screen/main.go\n```\n- Config\napp configuration\n```yaml\n# port to start HTTP server.\nport: \"81\"\n# show chromium debug\ndebug: false\n# http request rate limit: 1 req/sec and permits 2 bursts\nrate: 1\nbursts: 2\n# how long images will be stored\nimage_cache: 10m\n# paths\nstore: \"data/app_store\"\nlog: \"data/app_log\"\nchrome_data: \"data/chrome\"\n```\n```\n./bin/screenshot run -c \"config.yaml\"\n```\n\n## Capture\n - HTTP `POST /capture`\n```json\n{\n    \"url\":\"https://google.com\",\n}\n```\n\n - Response example\n```json\n{\n    \"Status\": 200,\n    \"Payload\": {\n        \"uuid\": \"c3b5ohg6n88rm0g59b30\"\n    }\n}\n```\n\n## Download\n - HTTP `GET /download/{uuid}`\n\n if the image was captured successfully this will return the captured image.\n\n in case there was an error capturing the images or the images is still pending captured, a message will be return instead of the emails\n\n - Response example \n ```json\n {\n    \"Status\": 500,\n    \"Payload\": \"page load error net::ERR_NAME_NOT_RESOLVED\"\n}\n ```\n or \n ```json\n {\n    \"Status\": 500,\n    \"Payload\": \"screenshot not yet captured.\"\n}\n ```\n\n## Stats\n - HTTP `POST /stats`\n\nthis will return general stats and resource usage.\n\n- Response example\n```json\n{\n    \"Status\": 200,\n    \"Payload\": {\n        \"Limiter\": {\n            \"total\": 1\n        },\n        \"Resources\": {\n            \"CPUs\": 4,\n            \"CompletedGC\": 5,\n            \"GCSize\": \"4.47M\",\n            \"Goroutine\": 4,\n            \"StackSystem\": \"480K\",\n            \"System\": \"70.83M\"\n        },\n        \"Store\": {\n            \"fail\": 0,\n            \"pending\": 0,\n            \"success\": 1\n        }\n    }\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftwiny%2Fscreenshot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftwiny%2Fscreenshot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftwiny%2Fscreenshot/lists"}