1
0
Fork 0
mirror of https://github.com/evilhero/mylar synced 2024-12-23 16:22:45 +00:00

FIX:(#382) If publisher is not given, would error out on series add/refresh

This commit is contained in:
evilhero 2013-05-08 22:35:12 -04:00
parent b08998ba82
commit 29a8f167aa
2 changed files with 9 additions and 1 deletions

View file

@ -164,7 +164,11 @@ def GetComicInfo(comicid,dom):
else:
comic['ComicIssues'] = dom.getElementsByTagName('count_of_issues')[0].firstChild.wholeText
comic['ComicImage'] = dom.getElementsByTagName('super_url')[0].firstChild.wholeText
comic['ComicPublisher'] = dom.getElementsByTagName('name')[trackcnt+2].firstChild.wholeText
try:
comic['ComicPublisher'] = dom.getElementsByTagName('name')[trackcnt+2].firstChild.wholeText
except:
comic['ComicPublisher'] = "Unknown"
comic['FirstIssueID'] = dom.getElementsByTagName('id')[0].firstChild.wholeText

View file

@ -106,6 +106,10 @@ def findComic(name, mode, issue, limityear=None):
pubnames = publishers[0].getElementsByTagName('name')
if len(pubnames) >0:
xmlpub = pubnames[0].firstChild.wholeText
else:
xmlpub = "Unknown"
else:
xmlpub = "Unknown"
if (result.getElementsByTagName('name')[0].childNodes[0].nodeValue) is None:
xmlimage = result.getElementsByTagName('super_url')[0].firstChild.wholeText
else: