From 99be5d9e130a5b1c4b7d50342fac026e3dd077a8 Mon Sep 17 00:00:00 2001 From: Bezleputh Date: Wed, 14 May 2014 21:51:54 +0200 Subject: [PATCH] [canalplus] fix browsing categories --- modules/canalplus/backend.py | 3 --- modules/canalplus/browser.py | 3 +-- modules/canalplus/pages.py | 2 +- 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/modules/canalplus/backend.py b/modules/canalplus/backend.py index 227929ce..166fd770 100644 --- a/modules/canalplus/backend.py +++ b/modules/canalplus/backend.py @@ -17,9 +17,6 @@ # You should have received a copy of the GNU Affero General Public License # along with weboob. If not, see . - - - import re from weboob.capabilities.video import ICapVideo, BaseVideo diff --git a/modules/canalplus/browser.py b/modules/canalplus/browser.py index 47e2171b..bea24143 100644 --- a/modules/canalplus/browser.py +++ b/modules/canalplus/browser.py @@ -92,13 +92,12 @@ class CanalplusBrowser(BaseBrowser): subchannels = self.iter_resources(split_path[0:1]) try: channel = [subchannel for subchannel in subchannels - if split_path == subchannel.split_path][0] + if split_path == subchannel.split_path][0] self.location("http://service.canal-plus.com/video/rest/getMEAs/cplus/%s" % channel._link_id) assert self.is_on_page(VideoPage) for video in self.page.iter_channel(): yield video except IndexError: raise CollectionNotFound(split_path) - else: raise CollectionNotFound(split_path) diff --git a/modules/canalplus/pages.py b/modules/canalplus/pages.py index ce951355..e45788a7 100644 --- a/modules/canalplus/pages.py +++ b/modules/canalplus/pages.py @@ -112,7 +112,7 @@ class VideoPage(BasePage): def parse_video_channel(self, el): _id = el[0].text video = CanalplusVideo(_id) - video.title = el[2][3][0].text + video.title = u'%s' % el[2][5][0].text video.date = datetime.now() return video