PhantomJS Scaper avatar

PhantomJS Scaper

Try for free

No credit card required

Go to Store
PhantomJS Scaper

PhantomJS Scaper

jancurn/phantomjs-scaper
Try for free

No credit card required

Development version of PhantomJS scraper. Some test change.

You can access the PhantomJS Scaper programmatically from your own applications by using the Apify API. You can choose the language preference from below. To use the Apify API, you’ll need an Apify account and your API token, found in Integrations settings in Apify Console.

1echo '{
2  "startUrls": [
3    {
4      "key": "START",
5      "value": "https://www.example.com/"
6    }
7  ],
8  "crawlPurls": [
9    {
10      "key": "MY_LABEL",
11      "value": "https://www.example.com/[.*]"
12    }
13  ],
14  "clickableElementsSelector": "a:not([rel=nofollow])",
15  "pageFunction": "function pageFunction(context) {\\n    // called on every page the crawler visits, use it to extract data from it\\n    var $ = context.jQuery;\\n    var result = {\\n        title: $('\''title'\'').text(),\\n        myValue: $('\''TODO'\'').text()\\n    };\\n    return result;\\n}\\n",
16  "interceptRequest": "function interceptRequest(context, newRequest) {\\n    // called whenever the crawler finds a link to a new page,\\n    // use it to override default behavior\\n    return newRequest;\\n}\\n"
17}' |
18apify call jancurn/phantomjs-scaper --silent --output-dataset

PhantomJS Scaper API through CLI

The Apify CLI is the official tool that allows you to use PhantomJS Scaper locally, providing convenience functions and automatic retries on errors.

Install the Apify CLI

1npm i -g apify-cli
2apify login

Other API clients include:

Developer
Maintained by Community

Actor Metrics

  • 2 monthly users

  • 1 star

  • >99% runs succeeded

  • Created in Feb 2019

  • Modified 2 years ago

Categories