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
- Python version 3.7 or above
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for rocketscraper-0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4b7ac1e6afaa3c1007807c4352b58ef6ad9b497ea70a6d00a5e757aa81aa0b59 |
|
MD5 | b87e0dc76fcc50e4a2e1944626b6a4d2 |
|
BLAKE2b-256 | 118c15b5326fe6e605a819b22e14ab53e547275b3ed435db21772bdf6de4b7f1 |