{"id":13532007,"url":"https://github.com/chfw/echarts-scrappeteer","last_synced_at":"2025-06-28T08:35:39.116Z","repository":{"id":57219212,"uuid":"102334643","full_name":"chfw/echarts-scrappeteer","owner":"chfw","description":"Puppeteer! Scrape all echarts in this web page please!","archived":false,"fork":false,"pushed_at":"2018-01-09T21:19:19.000Z","size":2547,"stargazers_count":47,"open_issues_count":0,"forks_count":7,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-13T11:50:20.955Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chfw.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-09-04T07:58:36.000Z","updated_at":"2025-04-10T18:56:14.000Z","dependencies_parsed_at":"2022-08-29T02:12:02.577Z","dependency_job_id":null,"html_url":"https://github.com/chfw/echarts-scrappeteer","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chfw%2Fecharts-scrappeteer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chfw%2Fecharts-scrappeteer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chfw%2Fecharts-scrappeteer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chfw%2Fecharts-scrappeteer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chfw","download_url":"https://codeload.github.com/chfw/echarts-scrappeteer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251342725,"owners_count":21574245,"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":[],"created_at":"2024-08-01T07:01:07.569Z","updated_at":"2025-04-28T16:16:05.722Z","avatar_url":"https://github.com/chfw.png","language":"JavaScript","funding_links":[],"categories":["Languages"],"sub_categories":["Node.js"],"readme":"# Echarts Scraper Puppeteer\n\n[![Build Status](https://travis-ci.org/chfw/echarts-scrappeteer.svg?branch=master)](https://travis-ci.org/chfw/echarts-scrappeteer) [![codecov](https://codecov.io/gh/chfw/echarts-scrappeteer/branch/master/graph/badge.svg)](https://codecov.io/gh/chfw/echarts-scrappeteer) [![npm version](https://badge.fury.io/js/echarts-scrappeteer.svg)](https://badge.fury.io/js/echarts-scrappeteer)\n\nFor svg output, it is required that **echarts 3.8+** is used and the echarts instance\nis [renderred as svg](https://ecomfe.github.io/echarts-doc/public/en/tutorial.html#Render%20by%20Canvas%20or%20SVG).\n\n## Introduction\n\nIt scrapes all echarts found in a web page as images. And it scrapes 3D charts too. Of course, it supports\n[pyecharts](https://github.com/chenjiandongx/pyecharts) as well. Please find the example in later section.\n\n![demo](https://github.com/chfw/echarts-scrappeteer/raw/master/demo.gif)\n\n## Installation\n\n```shell\n$ npm i -g echarts-scrappeteer\n```\n\n### requirements\n\nNode 7.6.0 or later\n\n## Usage\n\n```shell\n\nUsage: scrappeteer [options] \u003curl/file\u003e\n\n\nOptions:\n\n  -f, --format \u003cpng,jpeg,gif,svg\u003e         image format\n  -o, --output \u003coutputname\u003e               output file name\n  -w, --wait \u003cdelay in milli-seconds\u003e     wait a while before scrapping\n  -v, --viewPort \u003cwidth,height\u003e           force puppeteer to set viewport. for echarts gallery site only\n  -r, --clipRectangle \u003cx,y,width,height\u003e  record rectangle when making gif animation\n  -c, --frameCounts \u003cnumber\u003e              of frames. gif only\n  -i, --frameInterval \u003cnumber\u003e            frame intervals. gif only\n  -s, --skipFrames \u003cnumber\u003e               skip initial frames. gif only\n  -g, --gap time\u003cnumber\u003e                  between each gif snapshot. gif only\n  -h, --help                              output usage information\n```\n\nIf the page load speed is slow or if the resulting image is partial, `-w` parameter is\nrequired to delay the scrape action.\n\nPlease note that if more than one echarts should be found in a page, `-f` option applies to all.\n\n## Example\n\n### Scrape echarts from a URL\n\nHere is the command for your discretion:\n\n```\n$ scrappeteer https://pyecharts.github.io/echarts-china-cities-js/preview.html\n```\n\n### Scrape echarts from a local file\n\n\n```shell\n$ scrappeteer render.html\n```\n\nWhere does the `render.html` come from? It is genereted by pyecharts. Please visit [pyecharts-demo.py](https://github.com/chfw/echarts-scrappeteer/blob/master/pyecharts-demo/pyecharts-demo.py). \n\n\n![scrape pyecharts](https://github.com/chfw/echarts-scrappeteer/raw/master/scraped-gallery/output.4.png)\n\n\n## Gallery\n\n### Gif format :fire:\n\n```shell\nscrappeteer http://gallery.echartsjs.com/editor.html?c=xrkJtnKJq- -w 2000 -f gif -r 525,50,770,750 -o gf3 -i 300 -c 10 -v 1300,800\n```\n\n[![high speed route](https://github.com/chfw/echarts-scrappeteer/raw/master/scraped-gallery/shenzhen.gif)](http://gallery.echartsjs.com/editor.html?c=xrkJtnKJq-)\n\n### Static images\n\n[![step count](https://github.com/chfw/echarts-scrappeteer/raw/master/scraped-gallery/step-count.png)](http://gallery.echartsjs.com/editor.html?c=calendar-effectScatter)\n[![pig plan](https://github.com/chfw/echarts-scrappeteer/raw/master/scraped-gallery/pig-plan.png)](http://gallery.echartsjs.com/editor.html?c=xByUX8HuDZ)\n[![surface wave](https://github.com/chfw/echarts-scrappeteer/raw/master/scraped-gallery/surface-wave.png)](http://gallery.echartsjs.com/editor.html?c=xHkcYXm9pe)\n\n## LICENSE\n\nISC\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchfw%2Fecharts-scrappeteer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchfw%2Fecharts-scrappeteer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchfw%2Fecharts-scrappeteer/lists"}