{"id":21250915,"url":"https://github.com/natlee/pyppesnap","last_synced_at":"2025-07-11T01:31:46.142Z","repository":{"id":58508088,"uuid":"532237548","full_name":"NatLee/PyppeSnap","owner":"NatLee","description":"Get a snapshot from a website by using Pyppeteer.","archived":false,"fork":false,"pushed_at":"2022-09-03T18:53:19.000Z","size":14,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-11-17T01:46:16.109Z","etag":null,"topics":["base64","cli","cli-app","cli-tool","image","pdf","pyppeteer","python","screenshot","snapshot","webscraping"],"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/NatLee.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}},"created_at":"2022-09-03T11:17:42.000Z","updated_at":"2023-02-15T13:01:02.000Z","dependencies_parsed_at":"2022-09-05T15:31:20.919Z","dependency_job_id":null,"html_url":"https://github.com/NatLee/PyppeSnap","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NatLee%2FPyppeSnap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NatLee%2FPyppeSnap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NatLee%2FPyppeSnap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NatLee%2FPyppeSnap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NatLee","download_url":"https://codeload.github.com/NatLee/PyppeSnap/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225669684,"owners_count":17505363,"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":["base64","cli","cli-app","cli-tool","image","pdf","pyppeteer","python","screenshot","snapshot","webscraping"],"created_at":"2024-11-21T03:39:35.200Z","updated_at":"2024-11-21T03:39:35.775Z","avatar_url":"https://github.com/NatLee.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PyppeSnap\n\n[![Test](https://github.com/NatLee/PyppeSnap/actions/workflows/test.yml/badge.svg)](https://github.com/NatLee/PyppeSnap/actions/workflows/test.yml)[![Release](https://github.com/NatLee/PyppeSnap/actions/workflows/release.yml/badge.svg)](https://github.com/NatLee/PyppeSnap/actions/workflows/release.yml)\n\n![image](https://i.imgur.com/hgXl2l6.png)\n\n![pdf](https://i.imgur.com/JLe9bYi.png)\n\nThis is a tool for getting snapshot with base64 encoding from a website.\n\nAs DEMO image you see, just need one URL input to function.\n\nThis package support `image` and `pdf` with encoded base64.\n\n## Installation\n\n```bash\npip install pyppesnap\n```\n\nCheck it on [Pypi](https://pypi.org/project/PyppeSnap/).\n\n## Usage\n\nCommon use with code below.\n\n- Get image\n\n```python\nfrom pyppesnap import get_image_snapshot_by_url\nurl = 'https://www.google.com'\nprint(get_image_snapshot_by_url(url))\n```\n\n- Get PDF\n\n```python\nfrom pyppesnap import get_pdf_snapshot_by_url\nurl = 'https://www.google.com'\nprint(get_pdf_snapshot_by_url(url))\n```\n\n\u003e You need to give a valid URL like start with `http`, or Pyppeteer cannot navigate it.\n\n- CLI\n\nYou can try CLI mode for testing.\n\n```bash\npyppesnap --url https://www.google.com --type img\n```\n\nAnd the output here.\n\n```\n------------- Parameters ---------------\nURL: https://www.google.com\nType: img\n--------------- Base64 ------------------\niVBORw0KGgoAAAANSUhEUgAABkAAAAOECAYAAAD\n...\nCCAAAAAAAkM7/B83ojRnTa7oSAAAAAElFTkSuQmCC\n-------------------------------------\n```\n\nThis tool can be used with web framworks to get a snapshot, check details in [./example](https://github.com/NatLee/PyppeSnap/tree/main/example).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnatlee%2Fpyppesnap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnatlee%2Fpyppesnap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnatlee%2Fpyppesnap/lists"}