Skip to main content

aiocfscrape

A simple async Python module to bypass Cloudflare's anti-bot page. Based on aiohttp ClientSession. Solution was inherited from cfscrape module.

You could use it eg. with Python 3 and asyncio for concurrent crawling of web resources protected with CloudFlare.

Installation

Install with pip

pip install aiocfscrape

Basic Usage

aiocfscrape is a aiohttp.ClientSession wrapper. So aiohttp client reference can be used as the base.

To make simple get request do the following:

import asyncio
from aiocfscrape import CloudflareScraper

async def test_open_page(url):
    async with CloudflareScraper() as session:
        async with session.get(url) as resp:
            return await resp.text()

if __name__ == '__main__':
    asyncio.run(test_open_page('<your url>'))

Dependencies

License

aiocfscrape is offered under the MIT license.

Changelog

1.0.0 (2020-03-25)

0.0.9 (2019-03-21)

  • Update anit-bot integration to latest cfscrape version [gaardiolor]

0.0.8 (2019-03-16)

  • Update anit-bot integration to latest cfscrape version [gaardiolor]

0.0.7 (2019-01-10)

  • Fix error when host does not return a “Server” header [pavlodvornikov]

  • Update anit-bot integration to latest cfscrape version [gaardiolor]

0.0.6 (2018-06-19)

  • Update readme [pavlodvornikov]

0.0.5 (2018-06-19)

  • Fix aiohttp version 3 compatibility [ape364]

  • Bump js2py [ape364]

  • Update anti-bot integration to latest cfscrape version [dteh]

0.0.4 (2018-03-06)

  • Update anti-bot integration to latest cfscrape version [slazarov]

0.0.3 (2017-11-21)

  • Fix AttributError [ape364]

0.0.2 (2016-08-26)

  • Support timeout inside request [pavlodvornikov]

  • Update package information [pavlodvornikov]

  • Remove obsolete files [pavlodvornikov]

0.0.1 (2016-08-26)

  • Initial implementation

Metadata

Release files for aiocfscrape 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for aiocfscrape 1.0.0
File Size Uploaded Provenance
aiocfscrape-1.0.0.tar.gz 6.9 kB Without provenance Details

Release files / aiocfscrape-1.0.0.tar.gz

Download URL aiocfscrape-1.0.0.tar.gz
Size 6.9 kB
Tags Source
SHA-256 checksum
How to use checksums
3fc3dd05f802a8ac61001ac418cf7a248548eeabc730b2f01afad8de99c10dd1
BLAKE2b-256 checksum
How to use checksums
0c0ce39bb13e99fdbf296196c4ac59cf523b876e4a0bca0bfd75a3583a822096
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.38.0 CPython/3.7.2

Security for aiocfscrape 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page