Skip to main content

ScrapingBee Python SDK

Project description

ScrapingBee Python SDK

ScrapingBee is a web scraping API that handles headless browsers and rotates proxies for you. The Python SDK makes it easier to interact with ScrapingBee's API.

Installation

You can install ScrapingBee Python SDK with pip.

pip install scrapingbee

Usage

The ScrapingBee Python SDK is a wrapper around the requests library. ScrapingBee supports GET and POST requests.

Signup to ScrapingBee to get your API key and some free credits to get started.

Making a GET request

>>> from scrapingbee import ScrapingBeeClient

>>> client = ScrapingBeeClient(api_key='REPLACE-WITH-YOUR-API-KEY')

>>> response = client.get('https://www.scrapingbee.com', params={
    # Execute JavaScript code with a Headless Browser
    'render_js': True,
    # Scroll once
    'js_scroll': True,
    # Wait 5 seconds before returning the response
    'wait': 5000,
    # Use a premium proxy
    'premium_proxy': True,
    # Use a premium proxy in France
    'country_code': 'fr',
})

>>> response.text
'<!DOCTYPE html><html lang="en"><head>...'

ScrapingBee takes various parameters to render JavaScript, execute a custom JavaScript script, use a premium proxy from a specific geolocation and more. You can find all the supported parameters on ScrapingBee's documentation.

You can send custom cookies and headers like you would normally do with the requests library.

Using ScrapingBee with Scrapy

Scrapy is the most popular Python web scraping framework. You can easily integrate ScrapingBee's API with the Scrapy middleware.

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

scrapingbee-0.0.1.tar.gz (3.3 kB view details)

Uploaded Source

Built Distribution

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

scrapingbee-0.0.1-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

Details for the file scrapingbee-0.0.1.tar.gz.

File metadata

  • Download URL: scrapingbee-0.0.1.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.5

File hashes

Hashes for scrapingbee-0.0.1.tar.gz
Algorithm Hash digest
SHA256 4f33da385a376dd1063eaab0e9aac58ac584f472f22872119a4cac105121ddd0
MD5 5c780bbeaf94075a3f5bde8628a4052c
BLAKE2b-256 ea86ce91d90ce75fe6c2698b2bf9c394e0a54839a650a1ae0b665839ed6bb9b3

See more details on using hashes here.

File details

Details for the file scrapingbee-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: scrapingbee-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 3.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.5

File hashes

Hashes for scrapingbee-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7d0884ed2c36a86defa3653deb46b471b926b0377ccbbb82824c83094a3477ee
MD5 f473e06dbbbcd7213c453e13509f240b
BLAKE2b-256 88d00a41f0857940655c011a97113e9810b900e357139f0be6b1c5cd4a77f431

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