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
#!/usr/bin/python | |
from urllib2 import urlopen | |
from datetime import datetime | |
from rfc822 import parsedate_tz | |
# Download url to file with buffered read and progress display | |
def download(url, file_name): | |
u = urlopen(url) | |
f = open(file_name, 'wb') |
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
#!/usr/bin/python | |
from urllib2 import urlopen | |
from datetime import datetime | |
from rfc822 import parsedate_tz | |
# Check last modified time of an url using Last-Modified header | |
def check_last_modified(url): | |
u = urlopen(url) | |
meta = u.info() |