ihandmine / aioscpy

An asyncio + aiolibs crawler imitate scrapy framework
https://ihandmine.github.io
MIT License
126 stars 10 forks source link

Cookie and session use #4

Open temi4 opened 7 months ago

temi4 commented 7 months ago

Hello. May be you have example: how to use session as analog requests.Session?

ihandmine commented 6 months ago

If you want to use session mode to initiate a request, only aiohttp requests are supported. You only need to configure: REQUESTS_SESSION_STATS = True If you want to use cookie, you can use it in the download middleware: downloadmiddleware.py request.cookies = {}