Files
Baid_spider/baid_spider/core/downloader.py
T
2026-06-17 16:53:25 +08:00

22 lines
374 B
Python

import time
import asyncio
import requests
class Downloader:
def __init__(self):
pass
async def fetch(self,request):
return await self.download(request)
async def download(self,request):
response = requests.get(request.url)
print(response)
return response
# await asyncio.sleep(0.1)
# print('aaaa')