diff --git a/major_projects_grabber/major_projects_grabber.py b/major_projects_grabber/major_projects_grabber.py index f6c12e0..21e62ef 100644 --- a/major_projects_grabber/major_projects_grabber.py +++ b/major_projects_grabber/major_projects_grabber.py @@ -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()