Playwright Scraper avatar
Playwright Scraper

Pricing

Pay per usage

Go to Store
Playwright Scraper

Playwright Scraper

Developed by

Apify

Apify

Maintained by Apify

Crawls websites with the headless Chromium, Chrome, or Firefox browser and Playwright library using a provided server-side Node.js code. Supports both recursive crawling and a list of URLs. Supports login to a website.

4.3 (7)

Pricing

Pay per usage

36

Total users

1.4k

Monthly users

233

Runs succeeded

99%

Issue response

7.9 days

Last modified

24 days ago

.editorconfig

root = true
[*]
indent_style = space
indent_size = 4
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
end_of_line = lf

.eslintrc

{
"extends": "@apify",
"root": true
}

.gitignore

# This file tells Git which files shouldn't be added to source control
.idea
node_modules

Dockerfile

# First, specify the base Docker image. You can read more about
# the available images at https://sdk.apify.com/docs/guides/docker-images
# You can also use any other image from Docker Hub.
FROM apify/actor-node:16
# Second, copy just package.json and package-lock.json since it should be
# the only file that affects "npm install" in the next step, to speed up the build
COPY package*.json ./
# Install NPM packages, skip optional and development dependencies to
# keep the image small. Avoid logging too much and print the dependency
# tree for debugging
RUN npm --quiet set progress=false \
&& npm install --only=prod --no-optional \
&& echo "Installed NPM packages:" \
&& (npm list --only=prod --no-optional --all || true) \
&& echo "Node.js version:" \
&& node --version \
&& echo "NPM version:" \
&& npm --version
# Next, copy the remaining files and directories with the source code.
# Since we do this after NPM install, quick build will be really fast
# for most source file changes.
COPY . ./
# Optionally, specify how to launch the source code of your actor.
# By default, Apify's base Docker images define the CMD instruction
# that runs the Node.js source code using the command specified
# in the "scripts.start" section of the package.json file.
# In short, the instruction looks something like this:
#
# CMD npm start

INPUT_SCHEMA.json

{
"title": "Input schema for the apify_project actor.",
"type": "object",
"schemaVersion": 1,
"properties": {
"test": {
"title": "Test",
"type": "string",
"description": "There is testing input field description.",
"editor": "textfield"
}
},
"required": []
}

apify.json

{
"env": { "npm_config_loglevel": "silent" }
}

main.js

1// This is the main Node.js source code file of your actor.
2
3// Import Apify SDK. For more information, see https://sdk.apify.com/
4const { Actor } = require('apify');
5
6Actor.main(async () => {
7 // Get input of the actor (here only for demonstration purposes).
8 const input = await Actor.getInput();
9 console.log('Input:');
10 console.dir(input);
11
12 /**
13 * Actor code
14 */
15});

package.json

{
"name": "project-empty",
"version": "0.0.1",
"description": "This is a boilerplate of an Apify actor.",
"dependencies": {
"apify": "^3.0.1"
},
"devDependencies": {
"@apify/eslint-config": "^0.3.1",
"eslint": "^8.20.0"
},
"scripts": {
"start": "node main.js",
"lint": "./node_modules/.bin/eslint ./src --ext .js,.jsx",
"lint:fix": "./node_modules/.bin/eslint ./src --ext .js,.jsx --fix",
"test": "echo \"Error: oops, the actor has no tests yet, sad!\" && exit 1"
},
"author": "It's not you it's me",
"license": "ISC"
}