[weboob] [PATCH 1/1] Fix francetelevisions search

Fabien Grumelard fabix-symlink at grumi.net
Mon Feb 25 23:04:07 CET 2013


Signed-off-by: Fabien Grumelard <fabix-symlink at grumi.net>
---
 modules/francetelevisions/pages.py |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/francetelevisions/pages.py b/modules/francetelevisions/pages.py
index 87381ee..3d6b74f 100644
--- a/modules/francetelevisions/pages.py
+++ b/modules/francetelevisions/pages.py
@@ -47,14 +47,14 @@ class IndexPage(BasePage):
             for p in div.xpath('.//p[@class="bientot"]'):
                 video.title += ' - %s' % p.text.split('|')[0].strip()
             video.date = parse_dt(div.find('span').attrib['data-date'])
-            duration = div.xpath('.//a[@class="rs-genre-temps"]')[0].text.split('|')[1].strip()
+            duration = div.xpath('.//span[@class="type-duree"]')[0].text.split('|')[1].strip()
             if duration[-1:] == "'":
                 t = [0, int(duration[:-1])]
             else:
                 t = map(int, duration.split(':'))
             video.duration = datetime.timedelta(hours=t[0], minutes=t[1])
 
-            url = self.parser.select(div, 'figure.rs-cell-image img', 1).attrib['src']
+            url = self.parser.select(div, 'a.vignette img', 1).attrib['src']
             video.thumbnail = Thumbnail(url)
 
             yield video
-- 
1.7.10.4




More information about the weboob mailing list