# HG changeset patch # User Fabien Ninoles # Date 1414511509 14400 # Node ID 053eabfead094f0b2e20d3afee92871a7f626188 # Parent f7112a0f9df715f0a16322b86ac319e04c4b665b used stripped_strings for title and descriptions. diff -r f7112a0f9df7 -r 053eabfead09 update-hib.py --- 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))