Created
April 11, 2011 12:18
-
-
Save aantn/913423 to your computer and use it in GitHub Desktop.
Decompressing StackOverflow HTTP Responses
This file contains 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
import zlib | |
import requests | |
r = requests.get('http://api.stackoverflow.com/1.1/users/495995/top-answer-tags') | |
print r.content | |
print zlib.decompress(r.content, 16+zlib.MAX_WBITS) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment