Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env python
- from StringIO import StringIO
- import gzip
- import urllib2
- url = ["http://tumejorjuego.com/download/index.php?link=descargar-torrent/068992_vikingos-temporada-3-hdtv-720p-ac3-51/"]
- request = urllib2.Request(url[0])
- request.add_header('Accept-encoding', 'gzip')
- response = urllib2.urlopen(request)
- if response.info().get('Content-Encoding') == 'gzip':
- buf = StringIO( response.read())
- f = gzip.GzipFile(fileobj=buf)
- data = f.read()
- print data
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement