GithubHelp home page GithubHelp logo

geekwolverine / gepetto Goto Github PK

View Code? Open in Web Editor NEW

This project forked from hrbrmstr/gepetto

0.0 1.0 0.0 249 KB

๐ŸŽŽ ScrapingHub Splash-like REST API for Headless Chrome

Home Page: https://hrbrmstr.github.io/gepetto/index.html

JavaScript 75.35% HTML 24.65%

gepetto's Introduction

gepetto

ScrapingHub Splash-like REST API for Headless Chrome based on Puppeteer

Description

Splash is a lightweight, scriptable browser as a service with an HTTP API. This project aims to create the same for Headless Chrome and duplicate the high-level Splash API and offer similiar functionality as is provided by Splash's Lua interface (without supporting Lua).

The goal is not to become a full WebDriver (i.e. it's not aiming to replace Selenium) but to provide a straigthforward/concise facility for loading URLs in a javascript context and obtaining HTML, PDF or screenshot data back.

It requires a recent installation of Node.js and npm.

Installation

npm install https://gitlab.com/hrbrmstr/gepetto.git --global 

or:

git clone [email protected]/hrbrmstr/gepetto
cd gepetto
npm install [-g] # use -g for global installation which may require sudo on some systems

This will grab all the dependencies and also download a module-copy of Chromium for the platfor you are on.

What's Inside the Tin?

Starting the Server

If you only performed a local installation, then you can fire up gepetto in the module directory with:

$ node index
๐Ÿš€ Launch browser!
๐Ÿ‘ gepetto running on: http://localhost:3000

If you already have a service running on TCP port 3000, then you can change the port gepetto uses via:

$ PORT=#### node index

If you performed a global installation, you now have a gepetto command on your PATH and can just do:

$ gepetto

or:

PORT=#### gepetto

You can use the HOST environment variable to change what IP address the service listens on.

API Documentation

There is online API documentation for gepetto at the /documentation endpoint. i.e., if you're running with the defaults, you can go go http://localhost:3000/documentation and see the API documentation there.

Static documenation is avaiable at docs/index.html from the module's top-level directory.

gepetto's People

Contributors

hrbrmstr avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.