{"id":15691660,"url":"https://github.com/jtiala/wpdl","last_synced_at":"2025-05-08T01:14:06.620Z","repository":{"id":95876204,"uuid":"573179888","full_name":"jtiala/wpdl","owner":"jtiala","description":"⬇️ Scrape pages, posts, images and other data from a WordPress instance.","archived":false,"fork":false,"pushed_at":"2024-02-20T20:43:55.000Z","size":1319,"stargazers_count":9,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-08T01:14:00.268Z","etag":null,"topics":["crawler","downloader","scraper","scraping","wordpress"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/jtiala.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2022-12-01T21:48:44.000Z","updated_at":"2024-05-31T14:29:44.000Z","dependencies_parsed_at":"2024-02-20T21:49:04.589Z","dependency_job_id":"19f9ab3c-c402-499d-88bc-fa73c9830acb","html_url":"https://github.com/jtiala/wpdl","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jtiala%2Fwpdl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jtiala%2Fwpdl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jtiala%2Fwpdl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jtiala%2Fwpdl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jtiala","download_url":"https://codeload.github.com/jtiala/wpdl/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252978783,"owners_count":21834917,"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":["crawler","downloader","scraper","scraping","wordpress"],"created_at":"2024-10-03T18:22:45.880Z","updated_at":"2025-05-08T01:14:06.604Z","avatar_url":"https://github.com/jtiala.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# wpdl\n\n[![License](https://img.shields.io/npm/l/wpdl)](https://github.com/jtiala/wpdl/blob/main/LICENSE)\n[![Release](https://img.shields.io/github/v/release/jtiala/wpdl?sort=semver)](https://github.com/jtiala/wpdl/releases)\n[![npm](https://img.shields.io/npm/v/wpdl)](https://www.npmjs.com/package/wpdl)\n[![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg)](https://conventionalcommits.org)\n[![CI](https://github.com/jtiala/wpdl/actions/workflows/ci.yml/badge.svg)](https://github.com/jtiala/wpdl/actions/workflows/ci.yml)\n\nScrape pages, posts, images and other data from a WordPress instance using the WordPress [REST API](https://developer.wordpress.org/rest-api/). Use simple command line arguments to clean up the scraped data.\n\n![Screenshot of example usage of the tool in a terminal emulator.](https://raw.githubusercontent.com/jtiala/wpdl/main/usage.png)\n\n## Pre-requisites\n\nNode.js v19 or newer (for native fetch support).\n\n## Usage examples\n\nThe following commands use the latest version of `wpdl` that is published in [npm](https://www.npmjs.com/package/wpdl). To run the script locally, clone this repo and replace `npx wpdl` with `npx .`.\n\nScrape pages and posts\n\n```bash\nnpx wpdl --url https://your-wp-instance.com --pages --posts\n```\n\nScrape pages and clean up the html by filtering out all `img` elements and elements with the class `foo`. Also remove all elements without text content. From the json files, remove all the Jetpack and Yoast SEO data.\n\n```bash\nnpx wpdl --url https://your-wp-instance.com --pages --elementFilter img --classFilter foo --jsonFilter \"jetpack_*\" --jsonFilter \"yoast_*\" --removeEmptyElements\n```\n\nTo see full usage, run\n\n```bash\nnpx wpdl -h\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjtiala%2Fwpdl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjtiala%2Fwpdl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjtiala%2Fwpdl/lists"}