Last active
January 4, 2018 17:23
-
-
Save 0x8BADFOOD/1f3801f3553375128bca78a7e2ce9fea to your computer and use it in GitHub Desktop.
partnerLogin for Pandora sample
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/local/bin/python2.7 | |
import json | |
import urllib2 | |
username = "android" | |
password = "AC7IBG09A3DTSYM4R41UJWL07VLN8JI7" | |
deviceModel = "android-generic" | |
url = "https://tuner.pandora.com:443/services/json/?method=auth.partnerLogin" | |
values = { | |
"username" : username, | |
"password" : password, | |
"deviceModel": deviceModel, | |
"version" : "5" | |
} | |
data = json.dumps(values) | |
headers = {'content-type': 'application/json'} | |
req = urllib2.Request(url, data, headers) | |
response = urllib2.urlopen(req) | |
content = response.read() | |
print("data:", data) | |
print("url:", url) | |
print("response:", response) | |
print("content:", content) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment