parent
df73d5c576
commit
e72f112dfb
|
@ -1,7 +1,7 @@
|
|||
beautifulsoup4==4.9.1
|
||||
beautifulsoup4
|
||||
pyOpenSSL==19.1.0
|
||||
python-dateutil==2.8.1
|
||||
requests==2.24.0
|
||||
requests
|
||||
dnspython
|
||||
pyasn1
|
||||
pyasn1-modules
|
||||
|
|
|
@ -42,6 +42,7 @@ def download_to_file(url, file):
|
|||
user_agent = {
|
||||
"User-agent": "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:46.0) Gecko/20100101 Firefox/46.0"}
|
||||
try:
|
||||
logging.info(f'download_to_file - fetching url: {url}')
|
||||
r = requests.head(url, headers=user_agent)
|
||||
url_datetime = parsedate(r.headers['Last-Modified']).astimezone()
|
||||
file_datetime = datetime.datetime.fromtimestamp(
|
||||
|
|
Loading…
Reference in New Issue