Python:使用 cURL 获取重定向 url
我有兴趣使用 pycURL 获取重定向链中的中间 URL。因此,假设我有一个网站站点 A,它重定向到站点 B,然后重定向到站点 C。通常我只能看到站点 A(起始 URL)和站点 C(结束 URL),但是我也对恰好驻留的任何站点感兴趣位于起始站点和结束站点之间(在本例中为站点 B)。我该怎么做呢?
I am interested in getting the intermediate URLs in a redirect chain using pycURL. So, say I have a website, Site A, which redirects to Site B, which then redirects to Site C. Regularly I would only be able to see Site A (the starting URL) and Site C (the ending URL), however I am also interested in any sites that happen to reside in between the starting and ending site (in this case Site B). How would I go about doing this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
看看 PyCurl 回调:
Have a look to PyCurl Callbacks: