strip description

This commit is contained in:
Romain Bignon 2010-10-16 15:03:02 +02:00
commit 241179665d

View file

@ -163,10 +163,10 @@ class TorrentsPage(BasePage):
title_t = box.cssselect('div.head') title_t = box.cssselect('div.head')
if title_t: if title_t:
title = title_t[0].find('strong').text title = title_t[0].find('strong').text.strip()
body_t = box.cssselect('div.body') body_t = box.cssselect('div.body')
if body_t: if body_t:
body = html2text(self.browser.parser.tostring(body_t[0])) body = html2text(self.browser.parser.tostring(body_t[0])).strip()
if title and body: if title and body:
if torrent.description is NotLoaded: if torrent.description is NotLoaded: