Puppeteer Improved Inputs Scraper avatar
Puppeteer Improved Inputs Scraper

Deprecated

Pricing

Pay per usage

Go to Store
Puppeteer Improved Inputs Scraper

Puppeteer Improved Inputs Scraper

Deprecated

Developed by

Barry Schneider

Barry Schneider

Maintained by Community

Add the following options to inputs: Use Live View, Inject Query, and Inject Underscore

0.0 (0)

Pricing

Pay per usage

1

Total users

30

Monthly users

1

Last modified

4 years ago

You can access the Puppeteer Improved Inputs Scraper programmatically from your own applications by using the Apify API. You can also 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.

1import { ApifyClient } from 'apify-client';
2
3// Initialize the ApifyClient with your Apify API token
4// Replace the '<YOUR_API_TOKEN>' with your token
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9// Prepare Actor input
10const input = {
11 "startUrls": [
12 {
13 "url": "https://apify.com"
14 }
15 ],
16 "pseudoUrls": [
17 {
18 "purl": "https://apify.com[(/[\\w-]+)?]"
19 }
20 ],
21 "linkSelector": "a",
22 "proxyConfiguration": {
23 "useApifyProxy": false
24 },
25 "customData": {},
26 "pageFunction": async function pageFunction(context) {
27 const { page, request, log } = context;
28 const title = await page.title();
29 log.info(`URL: ${request.url} TITLE: ${title}`);
30 return {
31 url: request.url,
32 title
33 };
34 },
35 "preGotoFunction": async function preGotoFunction({ request, page, Apify }) {
36 /* add your pre-navigation logic here, if needed */
37 },
38 "initialCookies": [],
39 "waitUntil": [
40 "networkidle2"
41 ]
42};
43
44// Run the Actor and wait for it to finish
45const run = await client.actor("barry8schneider/puppeteer20191228").call(input);
46
47// Fetch and print Actor results from the run's dataset (if any)
48console.log('Results from dataset');
49console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
50const { items } = await client.dataset(run.defaultDatasetId).listItems();
51items.forEach((item) => {
52 console.dir(item);
53});
54
55// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

Puppeteer Improved Inputs Scraper API in JavaScript

The Apify API client for JavaScript is the official library that allows you to use Puppeteer Improved Inputs Scraper API in JavaScript or TypeScript, providing convenience functions and automatic retries on errors.

Install the apify-client

$npm install apify-client

Other API clients include: