Python equivalent of PHP curl request

后端 未结 4 1707
我在风中等你
我在风中等你 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:40

    You should use urlopen to issue requests.

    A simple example:

    import urllib2
    result = urllib2.urlopen("http://www.google.com/")
    print result.read()
    

    Read more here: http://docs.python.org/2/library/urllib2.html

    Google urlopen code examples, and you will find what you need.

提交回复
热议问题