.text() not text

This commit is contained in:
Adrian Malacoda 2016-11-27 00:14:16 -06:00
parent 9c401cbfb1
commit ea46ae8853

View File

@ -21,7 +21,7 @@ def scrape_index (url):
d = pq(url=url)
forum = Forum(title=d("title").text())
for category_element in d("div.span9 > div.row-fluid").items():
category = Category(title=category_element.find("h3").text)
category = Category(title=category_element.find("h3").text())
forum.categories.append(category)
for board_link in category_element.find("a[href^='/forums/']").items():
board = scrape_board("{}://{}{}".format(urlparts.scheme, urlparts.netloc, board_link.attr.href))