response = requests.get(
'http://weixin.sogou.com/weixin?query=%E9%A3%8E%E6%99%AF&type=2&page=2', headers=headers, allow_redirects=False)

图解此问题:

 

requests禁止重定向

没有用之前是这样的:

requests禁止重定向

requests禁止重定向

requests禁止重定向

 


 
                    
            
                

相关文章:

  • 2022-12-23
  • 2021-05-15
  • 2022-12-23
  • 2021-10-21
  • 2022-12-23
  • 2021-11-20
  • 2021-09-21
  • 2021-06-06
猜你喜欢
  • 2022-02-22
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-18
  • 2021-09-03
相关资源
相似解决方案