Closed user-1234 closed 3 years ago
from aiohttp import ClientSession from aiohttp import TCPConnector
async def request(url, headers, timeout=None): async with aiohttp.ClientSession(connector=TCPConnector(verify_ssl=False)) as session: async with session.get(url, headers=headers, timeout=timeout) as resp: return await resp.text() ..... .....
def collect_urls_and_metadata(self, start_url): response = requests.get(start_url, headers=self.headers, verify=False)
from aiohttp import ClientSession from aiohttp import TCPConnector
async def request(url, headers, timeout=None): async with aiohttp.ClientSession(connector=TCPConnector(verify_ssl=False)) as session: async with session.get(url, headers=headers, timeout=timeout) as resp: return await resp.text() ..... .....