Skip to content

Instantly share code, notes, and snippets.

@yasoob
Created June 9, 2013 17:23
Show Gist options
  • Save yasoob/5744377 to your computer and use it in GitHub Desktop.
Save yasoob/5744377 to your computer and use it in GitHub Desktop.
Myspace downloader
#!/usr/bin/env python3
import urllib.request
url = 'http://www.myspace.com/Modules/PageEditor/Handlers/Music/SearchMusic.ashx'
data = b'term=incomplete&maxArtists=10&maxSongs=20'
headers = {
'Hash':'MIGcBgkrBgEEAYI3WAOggY4wgYsGCisGAQQBgjdYAwGgfTB7AgMCAAECAmYDAgIAwAQIYLI97pYniaIEEEZ7OzdEz%2bIWLU44SUNWb30EUFjzQCE6jLLj9dgPm5be2u4N4ljriq5Up6l3RTd81ynC8UyNrmT8KElNy5%2bz8uxPHY3FdSDSgkJUuW3iF4SdT53bMvA8fAP2iOBxBMhGjy9d',
}
req = urllib.request.Request(url, data, headers)
r = urllib.request.urlopen(req)
print(r.info())
print(r.read())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment