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_vk_resolver(self): with open('fixtures/vknew.html') as f: html = f.read() formats = resolvers.vk_streams(html) self.assertEqual(len(formats), 2)
def test_player_parse(self): with open('fixtures/player.html') as f: html = f.read() formats = resolvers.vk_streams(html) self.assertEqual(len(formats), 2)