{"id":13583788,"url":"https://github.com/patrickschur/pappet","last_synced_at":"2025-08-25T22:02:02.235Z","repository":{"id":35001673,"uuid":"185016180","full_name":"patrickschur/pappet","owner":"patrickschur","description":"A command-line tool to crawl websites using puppeteer.","archived":false,"fork":false,"pushed_at":"2022-04-10T10:23:34.000Z","size":82,"stargazers_count":103,"open_issues_count":3,"forks_count":7,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-02T20:46:21.785Z","etag":null,"topics":["cli","crawler","pdf","puppeteer","screenshot"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/patrickschur.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":"2019-05-05T10:26:36.000Z","updated_at":"2024-04-02T20:46:17.000Z","dependencies_parsed_at":"2022-08-08T03:16:09.855Z","dependency_job_id":null,"html_url":"https://github.com/patrickschur/pappet","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patrickschur%2Fpappet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patrickschur%2Fpappet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patrickschur%2Fpappet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patrickschur%2Fpappet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/patrickschur","download_url":"https://codeload.github.com/patrickschur/pappet/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223264949,"owners_count":17116248,"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":["cli","crawler","pdf","puppeteer","screenshot"],"created_at":"2024-08-01T15:03:47.841Z","updated_at":"2024-11-06T00:30:45.381Z","avatar_url":"https://github.com/patrickschur.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# pappet\n\n![npm](https://img.shields.io/npm/v/pappet.svg)\n![npm](https://img.shields.io/npm/dm/pappet.svg)\n\nPappet is a command-line tool to crawl websites using puppeteer. \nIt allows you to crawl multiple pages in parallel and recursively. Take screenshots or create PDFs in seconds.\n\nInstall\n--\n```sh\nnpm i -g pappet\n```\n\nUsage\n--\n```text\nUsage: pappet [OPTION]... [URL]...\nOptions:\n  --help                 Show help\n  --version              Show version number\n  -q, --quit             Be quit\n  -t, --tabs             Set number of pages\n  -s, --screenshot       Take a screenshot\n  -p, --pdf              Take a PDF\n  -m, --mhtml            Save as mhtml\n  -r, --recursive        Recursively visit links\n  -l, --level            Set recursion depth\n  -w, --width            Set page width\n  -h, --height           Set page height\n  -f, --full-page        Take a screenshot of the full scrollable page\n  -L, --relative         Follow relative links only\n  --device-scale-factor  Specify device scale factor\n  --is-mobile            Take meta viewport into account\n  --has-touch            Support touch events\n  --is-landscape         Set viewport in landscape mode\n  --https-only           Follow HTTPS links only\n  --same-origin          Only visit pages with same origin\n  --disable-js           Disable javascript\n  --user-agent           Set user agent\n  --pattern              Only follow links that match the supplied regular expression\n```\n\nExamples\n--\nPappet allows you to write most of the options in a long and short form. I will use the shorter syntax here for convenience.\n\n##### Take a screenshot (-s, --screenshot)\n```sh\npappet -s https://example.com\n```\nYou can also specify the width and height of the viewport.\n```sh\npappet -s -w 800 -h 600 https://example.com\n```\nTake a screenshot of the full scrollable page. By specifying the option `-f` or `--full-page`.\n```sh\npappet -sf https://example.com\n```\n\n##### Take a PDF (-p, --pdf)\n```sh\npappet -p https://example.com\n```\n\n##### Save page as mhtml (-m, --mhtml)\n```sh\npappet -m https://example.com\n```\n\n##### Crawl a website recursively and take screenshots (-r, --recursive)\n```sh\npappet -sr https://example.com\n```\nWhen crawling websites recursively you should specify a maximum depth (default 1) for not crawling to long. \nYou can do that by using the `-l` or `--level` option.\n```sh\npappet -srl2 https://example.com\n```\n\n##### Crawl multiple pages at once\nYou can specify a infinite number of URLs to crawl.\n```sh\npappet -rs https://example.com https://example.com\n```\nWhen doing this it's recommended to use the option `-t` or `--tabs`. \nThis will set the maximum number of pages used by puppeteer (default 2). The more pages you have the faster it will be.\nBe careful by specifying this option. Some websites may block you, for sending to many requests at once.\n```\npappet -rst4 https://example.com\n```\n\n##### Disable javascript and take a screenshot\n```sh\npappet -sf --disable-js https://example.com\n```\n\n##### Only visit pages with same origin\nThis will only follow links of the same origin (`example.com`).\n```sh\npappet -rs --same-origin https://example.com\n```\n\n##### Only follow relative links\n```sh\npappet -rsL https://example.com\n```\n\n##### Using regular expression \n```sh\npappet -rp --pattern \"/articles/.*\" https://example.com\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpatrickschur%2Fpappet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpatrickschur%2Fpappet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpatrickschur%2Fpappet/lists"}