how to handle 302 redirect in scrapy

后端 未结 6 494
时光说笑
时光说笑 2020-11-29 09:32

I am receiving a 302 response from a server while scrapping a website:

2014-04-01 21:31:51+0200 [ahrefs-h] DEBUG: Redirecting (302) to 

        
6条回答
  •  臣服心动
    2020-11-29 10:00

    I had an issue with infinite loop on redirections when using HTTPCACHE_ENABLED = True. I managed to avoid the problem by setting HTTPCACHE_IGNORE_HTTP_CODES = [301,302].

提交回复
热议问题