Skip to main content

Scrapfly SDK for Scrapfly

Project description

Scrapfly SDK

Installation

pip install scrapfly-sdk

You can also install extra dependencies

  • pip install "scrapfly-sdk[seepdup]" for performance improvement
  • pip install "scrapfly-sdk[concurrency]" for concurrency out of the box (asyncio / thread)
  • pip install "scrapfly-sdk[scrapy]" for scrapy integration
  • pip install "scrapfly-sdk[all]" Everything!

For use of built-in HTML parser (via ScrapeApiResponse.selector property) additional requirement of either parsel or scrapy is required.

For reference of usage or examples, please checkout the folder /examples in this repository.

Get Your API Key

You can create a free account on Scrapfly to get your API Key.

Migration

Migrate from 0.7.x to 0.8

asyncio-pool dependency has been dropped

scrapfly.concurrent_scrape is now an async generator. If the concurrency is None or not defined, the max concurrency allowed by your current subscription is used.

    async for result in scrapfly.concurrent_scrape(concurrency=10, scrape_configs=[ScrapConfig(...), ...]):
        print(result)

brotli args is deprecated and will be removed in the next minor. There is not benefit in most of case versus gzip regarding and size and use more CPU.

What's new

0.8.x

  • Better error log
  • Async/Improvement for concurrent scrape with asyncio
  • Scrapy media pipeline are now supported out of the box

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

scrapfly-sdk-0.8.16.tar.gz (27.1 kB view details)

Uploaded Source

Built Distribution

scrapfly_sdk-0.8.16-py3-none-any.whl (31.9 kB view details)

Uploaded Python 3

File details

Details for the file scrapfly-sdk-0.8.16.tar.gz.

File metadata

  • Download URL: scrapfly-sdk-0.8.16.tar.gz
  • Upload date:
  • Size: 27.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.6

File hashes

Hashes for scrapfly-sdk-0.8.16.tar.gz
Algorithm Hash digest
SHA256 e77b5645e2516a1c73ef454fb3b51715c9e9e4264a59ae9cb4b065000e00c211
MD5 745de289fab8230f7e7056760a6f2142
BLAKE2b-256 f6e5e0c00669bd94c82b0dd3dea9932e130008f2ad3503b259c31f6fa45a4ac9

See more details on using hashes here.

File details

Details for the file scrapfly_sdk-0.8.16-py3-none-any.whl.

File metadata

File hashes

Hashes for scrapfly_sdk-0.8.16-py3-none-any.whl
Algorithm Hash digest
SHA256 4b5e5f060c02eeffb6859aea10a3f945e1988750b664968b116fb5f798f1c050
MD5 df1258f2233de66de4b54f22e4da6997
BLAKE2b-256 70539d1c62e111c4a3ae7e61a6a4e9ce1423d7352226a30265c13b680fc60f07

See more details on using hashes here.

Supported by

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