Fix #1447 : Get videos titles in h1

Signed-off-by: Loic Bontonou <loic.bontonou@gmail.com>
This commit is contained in:
Loic Bontonou 2014-10-28 11:33:45 +01:00 committed by Florent
commit bd1688d72f

View file

@ -32,7 +32,7 @@ class IndexPage(Page):
def iter_videos(self):
videos = self.document.getroot().cssselect("div[class=bloc-contenu-8]")
for div in videos:
title = self.parser.select(div, 'h1 a', 1).text_content().replace('"', '')
title = self.parser.select(div, 'h1', 1).text_content().replace(' ', ' ')
m = re.match(r'/contenu.php\?id=(.*)', div.find('a').attrib['href'])
_id = ''
if m: