OdhSpares avatar
OdhSpares

Pricing

Pay per usage

Go to Apify Store
OdhSpares

OdhSpares

Developed by

youssef python

youssef python

Maintained by Community

0.0 (0)

Pricing

Pay per usage

0

3

3

Last modified

3 days ago

Python Crawlee with Playwright template

A template for web scraping data from websites starting from provided URLs using Python. The starting URLs are passed through the Actor's input schema, defined by the input schema. The template uses Crawlee for Python for efficient web crawling, making requests via headless browser managed by Playwright, and handling each request through a user-defined handler that uses Playwright API to extract data from the page. Enqueued URLs are managed in the request queue, and the extracted data is saved in a dataset for easy access.

Included features

  • Apify SDK - a toolkit for building Apify Actors in Python.
  • Crawlee for Python - a web scraping and browser automation library.
  • Input schema - define and validate a schema for your Actor's input.
  • Request queue - manage the URLs you want to scrape in a queue.
  • Dataset - store and access structured data extracted from web pages.
  • Playwright - a library for managing headless browsers.

Resources

Getting started

For complete information see this article. To run the Actor use the following command:

$apify run

Deploy to Apify

Connect Git repository to Apify

If you've created a Git repository for the project, you can easily connect to Apify:

  1. Go to Actor creation page
  2. Click on Link Git Repository button

Push project on your local machine to Apify

You can also deploy the project on your local machine to Apify without the need for the Git repository.

  1. Log in to Apify. You will need to provide your Apify API Token to complete this action.

    $apify login
  2. Deploy your Actor. This command will deploy and build the Actor on the Apify Platform. You can find your newly created Actor under Actors -> My Actors.

    $apify push

Documentation reference

To learn more about Apify and Actors, take a look at the following resources: