urlopen Returning Redirect Error for Valid Links

后端 未结 3 610
[愿得一人]
[愿得一人] 2021-01-06 03:57

I\'m building a broken link checker in python, and it\'s becoming a chore building the logic for correctly identifying links that do not resolve when visited with a browser.

3条回答
  •  余生分开走
    2021-01-06 04:46

    I tried the solutions above without success.

    It appears that this problem can occur when the URL you are trying to open is badly formed (or just not what the REST service is expecting). For example, I found my problem was because I requested https://host.com/users/4484486 where the host was expecting a slash at the end: https://host.com/users/4484486/ solved the problem.

提交回复
热议问题