Skip to content

Instantly share code, notes, and snippets.

View super1024201's full-sized avatar
๐Ÿ˜†
Tomorrow is sunday.

super1024 super1024201

๐Ÿ˜†
Tomorrow is sunday.
View GitHub Profile
import urllib.request
class HtmlDownloader(object):
def download(self, url):
if url is None:
return None
response = urllib.request.urlopen(url)
if response.getcode() != 200:
return None
return response.read()