Skip to content

Instantly share code, notes, and snippets.

@amankharwal
Created Mar 3, 2021
Embed
What would you like to do?
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