pax_global_header 0000666 0000000 0000000 00000000064 13327341234 0014514 g ustar 00root root 0000000 0000000 52 comment=2afcb3e54feb70b6ec9d81fc15005cb84d375492
woob-2afcb3e54feb70b6ec9d81fc15005cb84d375492-modules-rmll/ 0000775 0000000 0000000 00000000000 13327341234 0022235 5 ustar 00root root 0000000 0000000 woob-2afcb3e54feb70b6ec9d81fc15005cb84d375492-modules-rmll/modules/ 0000775 0000000 0000000 00000000000 13327341234 0023705 5 ustar 00root root 0000000 0000000 woob-2afcb3e54feb70b6ec9d81fc15005cb84d375492-modules-rmll/modules/rmll/ 0000775 0000000 0000000 00000000000 13327341234 0024653 5 ustar 00root root 0000000 0000000 woob-2afcb3e54feb70b6ec9d81fc15005cb84d375492-modules-rmll/modules/rmll/TODO 0000664 0000000 0000000 00000000132 13327341234 0025337 0 ustar 00root root 0000000 0000000 Add following pseudo channels:
most-viewed
most-commented
count on latest
add API_KEY
woob-2afcb3e54feb70b6ec9d81fc15005cb84d375492-modules-rmll/modules/rmll/__init__.py 0000664 0000000 0000000 00000001430 13327341234 0026762 0 ustar 00root root 0000000 0000000 # -*- coding: utf-8 -*-
# Copyright(C) 2015 Guilhem Bonnefille
#
# This file is part of weboob.
#
# weboob is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# weboob is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with weboob. If not, see .
from .module import RmllModule
__all__ = ['RmllModule']
woob-2afcb3e54feb70b6ec9d81fc15005cb84d375492-modules-rmll/modules/rmll/browser.py 0000664 0000000 0000000 00000005152 13327341234 0026713 0 ustar 00root root 0000000 0000000 # -*- coding: utf-8 -*-
# Copyright(C) 2015 Guilhem Bonnefille
#
# This file is part of weboob.
#
# weboob is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# weboob is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with weboob. If not, see .
from weboob.browser import PagesBrowser, URL
from weboob.browser.exceptions import HTTPNotFound
from .pages import RmllCollectionPage, RmllVideoPage, RmllChannelsPage, RmllSearchPage, RmllLatestPage, RmllDurationPage
__all__ = ['RmllBrowser']
class RmllBrowser(PagesBrowser):
BASEURL = 'https://rmll.ubicast.tv'
index_page = URL(r'channels/content/(?P.+)', RmllCollectionPage)
latest_page = URL(r'api/v2/latest/', RmllLatestPage)
video_page = URL(r'permalink/(?P.+)/', RmllVideoPage)
channels_page = URL(r'api/v2/channels/content/\?parent_oid=(?P.*)', RmllChannelsPage)
search_page = URL(r'api/v2/search/\?search=(?P.+)', RmllSearchPage)
duration_page = URL(r'api/v2/medias/modes/\?oid=(?P.*)', RmllDurationPage)
def __init__(self, *args, **kwargs):
self.channels = None
PagesBrowser.__init__(self, *args, **kwargs)
@video_page.id2url
def get_video(self, url, video=None):
self.location(url)
assert self.video_page.is_here()
video = self.page.get_video(obj=video)
video.duration = self.duration_page.go(oid=video.id).get_duration()
return video
def search_videos(self, pattern):
url = self.search_page.build(pattern=pattern)
self.location(url)
return self.page.iter_resources()
def get_latest_videos(self):
url = self.latest_page.build()
self.location(url)
assert self.latest_page.is_here()
return self.page.iter_resources()
def get_channel_videos(self, split_path):
oid = ''
if len(split_path) > 0:
oid = split_path[-1]
try:
url = self.channels_page.build(oid=oid)
self.location(url)
assert self.channels_page.is_here()
for video in self.page.iter_resources(split_path):
yield video
except HTTPNotFound:
pass
woob-2afcb3e54feb70b6ec9d81fc15005cb84d375492-modules-rmll/modules/rmll/favicon.png 0000664 0000000 0000000 00000011171 13327341234 0027007 0 ustar 00root root 0000000 0000000 PNG
IHDR J M sRGB bKGD pHYs M Mħ tIME3GA IDATx{p]uʒcI