[canalplus] fix browsing categories
This commit is contained in:
parent
47c634e90c
commit
99be5d9e13
3 changed files with 2 additions and 6 deletions
|
|
@ -17,9 +17,6 @@
|
|||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with weboob. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
|
||||
|
||||
import re
|
||||
|
||||
from weboob.capabilities.video import ICapVideo, BaseVideo
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue