# HG changeset patch # User Fabien Ninoles # Date 1404651262 14400 # Node ID 9d5880ecdb8202d31f2d1077b64f227d6d795b44 # Parent dc1b075c538a20344ea55f5e44ae2c57df5d5dbd Fix a bug when there is no in a title (like for Eye-Candy art). diff -r dc1b075c538a -r 9d5880ecdb82 update-hib.py --- a/update-hib.py Sat Mar 29 00:13:35 2014 -0400 +++ b/update-hib.py Sun Jul 06 08:54:22 2014 -0400 @@ -134,7 +134,10 @@ continue classes = child["class"] if "class" in child.attrs else [] if "gameinfo" in classes: - self.title = child.find(class_="title").a.string.strip() + divTitle = child.find(class_="title") + if divTitle.a: + divTitle = divTitle.a + self.title = divTitle.string.strip() elif "downloads" in classes: logging.debug("Collecting downloadables for %s", self.title) self.downloads.append(Downloads(child)) @@ -198,8 +201,6 @@ if dl.dltype == "ebook": if "MOBI" in dl.attrs: return -1 - if "HD" in dl.attrs: - return 2 return 1 raise Exception("Unknown dls type: %r" % (dl,))