gain
gain copied to clipboard
Add hooks before download and after download.
我们想在下载前或者下载后加一些东西,比如保存整个url。或者针对不同的状态码做不同的处理,比如3xx的重定向,5xx时重试等。
Google translate from @songww:
We want to add something before or after the download, such as saving the entire url. Or do different processing for different status codes, such as 3xx redirection, 5xx retry, etc.
@songww ,
Can you elaborate a bit more on your before and afterhooks. I might be able to implement this for you if you specify a bit more in detail why you need this and how you would use it.
Just like middleware of scrapy.
@kwuite