def streams_from_clip_id(self, clip_id): html = self._serie_iframe(clip_id) if 'iframe' in html: player_urls = self._scrap_movie(html) if len(player_urls) == 0: return [] return self.streams_from_player_url(player_urls[0]) elif 'leanback-player-video' in html: return resolvers.leanback_streams(html) elif 'leanback-player-flash-fallback' in html: return resolvers.leanback_streams(html)
def streams_from_player_url(self, url): html = self._fetch_html(url) if 'vk.com' in url: return resolvers.vk_streams(html) if 'docs.google.com' in url: return resolvers.google_streams(html) if 'dreamfilm.se' in url: return resolvers.leanback_streams(html) return []
def streams_from_player_url(url): if 'mail.ru' in url: return resolvers.mailru_streams(url) html = _fetch_html(url) if 'vk.com' in url: return resolvers.vk_streams(html) if 'docs.google.com' in url: return resolvers.google_streams(html) if 'dreamfilm.se' in url: return resolvers.leanback_streams(html) return [('video', url)]
def streams_from_player_url(url): print url if 'mail.ru' in url: return resolvers.mailru_streams(url) if 'picasaweb.google.com' in url: return resolvers.picasa_streams(url) if 'ok.ru' in url: return resolvers.okru_streams(url) if 'vkpass.com' in url: return resolvers.vkpass_streams(url) html = _fetch_html(url) if 'vk.com' in url: return resolvers.vk_streams(html) if 'docs.google.com' in url: return resolvers.google_streams(html) if 'dreamfilm.se' in url: return resolvers.leanback_streams(html) return [('video', url)]
def streams_from_player_url(url): # Fix for some urls that contains spaces url = url.replace(' ', '') if 'mail.ru' in url: return resolvers.mailru_streams(url) if 'picasaweb.google.com' in url: return resolvers.picasa_streams(url) if 'ok.ru' in url: return resolvers.okru_streams(url) if 'vkpass.com' in url: return resolvers.vkpass_streams(url) html = _fetch_html(url) if 'vk.com' in url: return resolvers.vk_streams(html) if 'docs.google.com' in url: return resolvers.google_streams(html) if 'dreamfilm.se' in url: return resolvers.leanback_streams(html) return [('video', url)]
def streams_from_player_url(url): # Fix for some urls that contains spaces url = url.replace(' ', '') print url if 'mail.ru' in url: return resolvers.mailru_streams(url) if 'picasaweb.google.com' in url: return resolvers.picasa_streams(url) if 'ok.ru' in url: return resolvers.okru_streams(url) if 'vkpass.com' in url: return resolvers.vkpass_streams(url) html = _fetch_html(url) if 'vk.com' in url: return resolvers.vk_streams(html) if 'docs.google.com' in url: return resolvers.google_streams(html) if 'dreamfilm.se' in url: return resolvers.leanback_streams(html) return [('video', url)]
def test_leanback_twitvid_parse(self): with open('fixtures/leanback_twitvid.html') as f: html = f.read() formats = resolvers.leanback_streams(html) self.assertEqual(len(formats), 1)