mirror of
https://github.com/evilhero/mylar
synced 2025-03-15 08:18:44 +00:00
FIX: When adding TPB/GN series that collects other TPB series, would incorrectly attempt to find an issue number resulting in an error
This commit is contained in:
parent
f53ad0fe71
commit
0cfe3e22e0
1 changed files with 24 additions and 14 deletions
18
mylar/cv.py
18
mylar/cv.py
|
@ -374,8 +374,10 @@ def GetComicInfo(comicid, dom, safechk=None):
|
|||
#if it's point form bullets, ignore it cause it's not the current volume stuff.
|
||||
test_it = desc_soup.find('ul')
|
||||
if test_it:
|
||||
for x in test_it.findAll('a'):
|
||||
micdrop.append(x['data-ref-id'])
|
||||
for x in test_it.findAll('li'):
|
||||
if any(['Next' in x.findNext(text=True), 'Previous' in x.findNext(text=True)]):
|
||||
mic_check = x.find('a')
|
||||
micdrop.append(mic_check['data-ref-id'])
|
||||
|
||||
for fc in desclinks:
|
||||
#logger.info('fc: %s' % fc)
|
||||
|
@ -394,6 +396,7 @@ def GetComicInfo(comicid, dom, safechk=None):
|
|||
fc_cid = fc_id
|
||||
fc_isid = None
|
||||
issuerun = fc.next_sibling
|
||||
if issuerun is not None:
|
||||
lines = re.sub("[^0-9]", ' ', issuerun).strip().split(' ')
|
||||
if len(lines) > 0:
|
||||
for x in sorted(lines, reverse=True):
|
||||
|
@ -403,8 +406,14 @@ def GetComicInfo(comicid, dom, safechk=None):
|
|||
if issuerun[srchline+len(x)] == ',' or issuerun[srchline+len(x)] == '.' or issuerun[srchline+len(x)] == ' ':
|
||||
issuerun = issuerun[:srchline+len(x)]
|
||||
break
|
||||
except:
|
||||
except Exception as e:
|
||||
logger.warn('[ERROR] %s' % e)
|
||||
continue
|
||||
else:
|
||||
iss_start = fc_name.find('#')
|
||||
issuerun = fc_name[iss_start:].strip()
|
||||
fc_name = fc_name[:iss_start].strip()
|
||||
|
||||
if issuerun.endswith('.') or issuerun.endswith(','):
|
||||
#logger.fdebug('Changed issuerun from %s to %s' % (issuerun, issuerun[:-1]))
|
||||
issuerun = issuerun[:-1]
|
||||
|
@ -412,7 +421,8 @@ def GetComicInfo(comicid, dom, safechk=None):
|
|||
issuerun = issuerun[:-4].strip()
|
||||
elif issuerun.endswith(' and'):
|
||||
issuerun = issuerun[:-3].strip()
|
||||
|
||||
else:
|
||||
continue
|
||||
# except:
|
||||
# pass
|
||||
issue_list.append({'series': fc_name,
|
||||
|
|
Loading…
Add table
Reference in a new issue