-
-
Save amankharwal/1b6a747c9bd1ee096a70c3b1f9b68aac to your computer and use it in GitHub Desktop.
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
from urllib.request import urlopen | |
response = urlopen('http://stackoverflow.com/questions?sort=votes') | |
data = response.read() | |
encoding = response.info().get_content_charset() | |
html = data.decode(encoding) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment