Skip to content

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

License

Notifications You must be signed in to change notification settings

pavlodvornikov/aiocfscrape

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

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

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages