used stripped_strings for title and descriptions.
--- a/update-hib.py Thu Aug 28 07:31:43 2014 -0400
+++ b/update-hib.py Tue Oct 28 11:51:49 2014 -0400
@@ -45,7 +45,7 @@
self.dltype = dltype
ids = [attr for attr in soup["class"] if attr != "download"]
button = soup.find(class_="flexbtn")
- desc = button.span.string
+ desc = " ".join(button.span.stripped_strings)
ids.extend(desc.split(" "))
self.id = " ".join(ids)
def cleanup(attr):
@@ -135,9 +135,7 @@
classes = child["class"] if "class" in child.attrs else []
if "gameinfo" in classes:
divTitle = child.find(class_="title")
- if divTitle.a:
- divTitle = divTitle.a
- self.title = divTitle.string.strip()
+ self.title = " ".join(divTitle.stripped_strings)
elif "downloads" in classes:
logging.debug("Collecting downloadables for %s", self.title)
self.downloads.append(Downloads(child))