Skip to main content

Scraping Pros API Client

Project description

ScrapingPros' client for Python

The ScrapingPros' API Client for Python is the official library to access the ScrapingPros' API from your Python applications. It provides useful features like jobs running retries and convenience functions to improve your experience with the ScrapingPros' API.

Installation

Requires Python 3.6+ You can install the package from its PyPI listing. Just by running pip install scrapingpros in your terminal. You may need to install requests package too. pip install requests

Usage

For usage instructions, check the documentation on ScrapingPros' Docs.

Quick Start

from scraping_pros import Batch, Project, Job

# Considering we want to work on the project with the ID 64.
PROJECT_ID = 64 # 
# Project must be previously created.
API_KEY = "your-api-key"
 # We create the batch that will hold all the jobs we want to run.
project = Project(api_key=API_KEY, project_id=PROJECT_ID, verbose=True)
first_batch = project.create_batch("first_batch")


# We create a job and append it to the batch, selecting the scrap mode.
url_to_scrape = ["url"]
first_batch.append_jobs(url_to_scrape, ScrapMode.PUPPETEER)

# Puts this job to run.
first_batch.run()

# Retrieves html for all jobs in that batch whenever it finishes running.
data = first_batch.get_data()

The package provides tools to manage every aspect of running jobs and retrieving data. It includes functions to easily execute and access data for Batches and Jobs.

Automatic Retries

The package automatically retries any operation—such as run() or get_data()—to handle intermittent issues and improve reliability.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

scrapingpros-0.1.3.tar.gz (7.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

scrapingpros-0.1.3-py3-none-any.whl (7.4 kB view details)

Uploaded Python 3

File details

Details for the file scrapingpros-0.1.3.tar.gz.

File metadata

  • Download URL: scrapingpros-0.1.3.tar.gz
  • Upload date:
  • Size: 7.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.9.20

File hashes

Hashes for scrapingpros-0.1.3.tar.gz
Algorithm Hash digest
SHA256 b707f80f5af1a3943a59e15e94733aaa3c2b9064c539e5f6557fa328715127c3
MD5 e3a1f9b810d0afc133a076e3c5c0af22
BLAKE2b-256 ccebcf6a2fe80b8523107024bb4d9f8dfc13bf754c84df6b4b17bc873089f9b1

See more details on using hashes here.

File details

Details for the file scrapingpros-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: scrapingpros-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 7.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.9.20

File hashes

Hashes for scrapingpros-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 a10d4f6a442fb0e23fd0b76a870ec873e822fd8f547268dcde52fd0c8bf93b26
MD5 b515a1e02540b7eea44975337d7d687b
BLAKE2b-256 858308ca8abdf10ded7c41648a0b68bbe6d34f35227ac9b2e765505878c0ea1e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page