Skip to main content

Python SDK for the Rocket Scraper API.

Project description

Rocket Scraper API Python SDK

Python SDK for the Rocket Scraper API. For more information, visit the GitHub repository.

Requirements

Installation

pip install rocketscraper

Usage

To use the SDK, you need to create a new instance of the RocketClient class and pass your API key as an argument.

Setup

from rocketscraper import RocketClient

rocket_client = RocketClient(api_key='YOUR_API_KEY')

Scrape

The scrape method allows you to scrape data from a website using a schema. The method returns the scraped data in the format specified in the schema.

data = rocket_client.scrape(
    url='https://ycombinator.com/companies/pagerduty',
    schema={
        'company': 'string',
        'image_url': 'string',
        'founded_at': 'string',
        'size': 'integer',
        'location': 'string',
        'short_description': 'string',
        'long_description': 'string',
        'is_active': 'boolean',
        'founders': [
            {
                'name': 'string',
                'role': 'string',
            },
        ],
    }
)

print(data)

For more details, visit the Python SDK GitHub repository.

Documentation

For more information on how to use the Rocket Scraper API, visit the Rocket Scraper API documentation.

License

This project is licensed under the MIT License. See the LICENSE file for more details.

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

rocketscraper-0.0.3.tar.gz (3.3 kB view hashes)

Uploaded Source

Built Distribution

rocketscraper-0.0.3-py3-none-any.whl (3.7 kB view hashes)

Uploaded Python 3

Supported by

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