From d4e930d4a64ada38a0fdb1335c9e1fb334146022 Mon Sep 17 00:00:00 2001 From: evilhero Date: Mon, 11 Feb 2019 17:04:28 -0500 Subject: [PATCH] FIX:(#2195) When adding a TPB/GN series that is missing a html id within the description field would error when attempting to parse the description properly --- mylar/cv.py | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/mylar/cv.py b/mylar/cv.py index a94193dd..4922cb80 100755 --- a/mylar/cv.py +++ b/mylar/cv.py @@ -380,12 +380,16 @@ def GetComicInfo(comicid, dom, safechk=None): micdrop.append(mic_check['data-ref-id']) for fc in desclinks: - #logger.info('fc: %s' % fc) - fc_id = fc['data-ref-id'] - #logger.info('fc_id: %s' % fc_id) + try: + fc_id = fc['data-ref-id'] + except: + continue + if fc_id in micdrop: continue + fc_name = fc.findNext(text=True) + if fc_id.startswith('4000'): fc_cid = None fc_isid = fc_id @@ -432,7 +436,10 @@ def GetComicInfo(comicid, dom, safechk=None): #first_collect = cis logger.info('Collected issues in volume: %s' % issue_list) - comic['Issue_List'] = issue_list + if len(issue_list) == 0: + comic['Issue_List'] = 'None' + else: + comic['Issue_List'] = issue_list else: comic['Issue_List'] = 'None'