diff --git a/README.md b/README.md new file mode 100644 index 0000000..c23c8e9 --- /dev/null +++ b/README.md @@ -0,0 +1,29 @@ +# rrx_resource + +## Requirements +- Node.js 18+ +- Playwright: `npm install playwright` + +## Usage +### Default workflow +```bash +node run.mjs "https://h5.rrx.cn/storeview/.html" +``` + +### Remote Chrome DevTools (optional) +```bash +node run.mjs "https://h5.rrx.cn/storeview/.html" --cdp http://127.0.0.1:9222 +``` +Or set: +```bash +export ENV_CDP=http://127.0.0.1:9222 +``` + +## Output +- Screenshot: `downloads/--<page-id>/index.png` +- Media files: `downloads/<date>-<title>-<page-id>/media/` +- Source URLs: `downloads/<date>-<title>-<page-id>/urls.txt` + +## Notes +- Viewport: 375×667 @ dpr 3 +- Only audio/video/image URLs are collected