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

Laurent Bachelier laurent at bachelier.name
Tue Feb 26 11:15:40 CET 2013


Thanks, it's now applied in git.
The module of the stable version should be available through
"weboob-config update" soon.

On 2013-02-25 23:04, Fabien Grumelard wrote:
> 
> 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
> 




More information about the weboob mailing list