From 734c99cfdb0cb7c6b449b700c564d61a0204171b Mon Sep 17 00:00:00 2001 From: Nick Sweeting Date: Mon, 30 Oct 2017 03:03:31 -0500 Subject: [PATCH] fix parser bailing out with IndexError --- parse.py | 2 +- util.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/parse.py b/parse.py index 0a203fe2..54eb8344 100644 --- a/parse.py +++ b/parse.py @@ -49,7 +49,7 @@ def parse_links(path): links += list(parser_func(file)) if links: break - except (ValueError, TypeError): + except (ValueError, TypeError, IndexError): # parser not supported on this file pass diff --git a/util.py b/util.py index d6b6029f..f02afdea 100644 --- a/util.py +++ b/util.py @@ -387,7 +387,7 @@ def cleanup_archive(path, links): if unmatched: print('[!] Warning! {} unrecognized folders in html/archive/'.format(len(unmatched))) - print('\n '.join(unmatched)) + print(' '+ '\n '.join(unmatched)) def html_appended_url(link):