Curl works but not Python requests

前端 未结 3 1663
挽巷
挽巷 2021-02-12 19:59

I am trying to fetch a JSON response from http://erdos.sdslabs.co/users/shagun.json. Using browser/Python\'s Requests library leads to an authentication error, but curl seems t

3条回答
  •  逝去的感伤
    2021-02-12 20:10

    For late googlers like myself:

    In my case, the problem was that I provided url params using requests.get(url, data={...}). After changing it to requests.get(url, params={...}), the problem was solved.

提交回复
热议问题