'Changed my code, getting new error. Any way to asynchronously make http requests with cloudscraper?

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

I changed my code to this. Now I receive the error: "TypeError: object Response can't be used in 'await' expression". Is there any way to asynchronously make http requests with clouscraper?



Sources

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

Source: Stack Overflow

Solution Source