Python equivalent of PHP curl request

后端 未结 4 1639
我在风中等你
我在风中等你 2021-01-07 02:38

I\'m using Rauth for my queries to the Beatport API. I\'m using this working example in PHP as reference.

This PHP code below uses a request token to log in and auth

4条回答
  •  攒了一身酷
    2021-01-07 02:59

    use pycurl it is a python implementation of lib curl.

    import pycurl
    c = pycurl.Curl()
    c.setopt(pycurl.URL, "http://www.python.org/")
    c.setopt(pycurl.HTTPHEADER, ["Accept:"])
    ...
    

    you can find more examples and documentation here http://pycurl.sourceforge.net/doc/curlobject.html

提交回复
热议问题