[francetelevisions] add option to get video from an url

this will allow to do things like that : videoob -d -b francetelevisions download http://pluzz.francetv.fr/videos/faites_entrer_l_accuse.html
This commit is contained in:
Bezleputh 2015-01-06 17:04:11 +01:00 committed by Florent
commit 6c550ea5a7
3 changed files with 13 additions and 0 deletions

View file

@ -35,6 +35,11 @@ class PluzzBrowser(PagesBrowser):
video_page = URL(r'http://webservices.francetelevisions.fr/tools/getInfosOeuvre/v2/\?idDiffusion=(?P<id>.*)&catalogue=Pluzz', VideoPage)
videos_list_page = URL('(?P<program>videos/.*)', VideoListPage)
def get_video_from_url(self, url):
video = self.videos_list_page.go(program=url).get_last_video()
if video:
return self.get_video(video.id, video)
def search_videos(self, pattern):
if not self.PROGRAMS:
self.PROGRAMS = self.get_program_list()