|
|
|
@ -17,6 +17,7 @@ import shutil
|
|
|
|
|
import logging
|
|
|
|
|
import requests
|
|
|
|
|
import argparse
|
|
|
|
|
import warnings
|
|
|
|
|
from lxml import html
|
|
|
|
|
from tqdm import tqdm
|
|
|
|
|
from requests.exceptions import ConnectionError, InvalidURL
|
|
|
|
@ -206,6 +207,15 @@ def main():
|
|
|
|
|
# Tidy up console after tqdm
|
|
|
|
|
print('\n')
|
|
|
|
|
|
|
|
|
|
# Check contents of log file
|
|
|
|
|
with open(log_name, 'r') as f:
|
|
|
|
|
log_data = f.read()
|
|
|
|
|
|
|
|
|
|
if log_data:
|
|
|
|
|
warnings.warn(
|
|
|
|
|
'Some files failed to download. See log for details.',
|
|
|
|
|
stacklevel=2)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
|
|
main()
|
|
|
|
|