'AttributeError when using cloudscraper object in asynchronous function

import cloudscraper
import requests
import asyncio
async def scrape_prices():
    scraper_object = cloudscraper.create_scraper()
    async with scraper_object as session:
        for item_number in prices_to_be_scraped:
            hyperlink = "https://opensea.io/assets/" +
            str(get_contract_address(get_project_name())) + "/" + str(
            item_number)
            async with str(scraper_object.get(hyperlink).text) as response:
                print(await response)

ERROR IM GETTING IN TERMINAL:

async with scraper_object as session: AttributeError: __aenter __



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source