Socket
Book a DemoInstallSign in
Socket

echarts-scrappeteer

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

echarts-scrappeteer

Find all echarts in a web page and save them as image using puppeteer

latest
Source
npmnpm
Version
1.2.0
Version published
Maintainers
1
Created
Source

Echarts Scraper Puppeteer

Build Status codecov npm version

For svg output, it is required that echarts 3.8+ is used and the echarts instance is renderred as svg.

Introduction

It scrapes all echarts found in a web page as images. And it scrapes 3D charts too. Of course, it supports pyecharts as well. Please find the example in later section.

Installation

$ npm i -g echarts-scrappeteer

requirements

Node 7.6.0 or later

Usage


Usage: scrappeteer [options] <url/file>


Options:

  -f, --format <png,jpeg,gif,svg>         image format
  -o, --output <outputname>               output file name
  -w, --wait <delay in milli-seconds>     wait a while before scrapping
  -v, --viewPort <width,height>           force puppeteer to set viewport. for echarts gallery site only
  -r, --clipRectangle <x,y,width,height>  record rectangle when making gif animation
  -c, --frameCounts <number>              of frames. gif only
  -i, --frameInterval <number>            frame intervals. gif only
  -s, --skipFrames <number>               skip initial frames. gif only
  -g, --gap time<number>                  between each gif snapshot. gif only
  -h, --help                              output usage information

If the page load speed is slow or if the resulting image is partial, -w parameter is required to delay the scrape action.

Please note that if more than one echarts should be found in a page, -f option applies to all.

Example

Scrape echarts from a URL

demo

Here is the command for your discretion:

$ scrappeteer https://pyecharts.github.io/echarts-china-cities-js/preview.html

Scrape echarts from a local file

$ scrappeteer render.html

Where does the render.html come from? It is genereted by pyecharts. Please visit pyecharts-demo.py.

scrape pyecharts

Gif format :fire:

scrappeteer 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

high speed route

Static images

step count pig plan surface wave

LICENSE

ISC

Keywords

echarts

FAQs

Package last updated on 09 Jan 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.