Crawl websites with PhantomJS or Puppeteer
npm install headless-browserbash
npm i -g phantom-crawler-server
`$3
Execute command to run:
`bash
phantom-crawler
`#### GET
Get a specific page
`text
METHOD: GET
URL: /get/:url
RESPONSE:
{
status_code: 200,
data: ""
}
`#### DOWNLOAD
Download the active page
`text
METHOD: GET
URL: /download
RESPONSE: content.html
`#### DISPLAY
Display the active page
`text
METHOD: GET
URL: /display
RESPONSE:
`#### CLICK
Click on something on the page
`text
METHOD: POST
URL: /click
BODY:
{
query: "#someQuerySelector"
}
`#### FILL
Fill out some form inputs
`text
METHOD: POST
URL: /fill
BODY:
{
inputs: {
#someQuerySelector": "value"
#someQuerySelector2": "value2"
}
}
``