/aiocfscrape

A simple async Python module to bypass Cloudflare\'s anti-bot page. Based on aiohttp ClientSession.

Primary LanguagePythonMIT LicenseMIT

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.

Install with pip

pip install aiocfscrape

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>'))

aiocfscrape is offered under the MIT license.