本文整理匯總了Python中resources.lib.youtube.Provider類的典型用法代碼示例。如果您正苦於以下問題:Python Provider類的具體用法?Python Provider怎麽用?Python Provider使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
在下文中一共展示了Provider類的13個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: test_play
def test_play(self):
provider = Provider()
path = kodion.utils.create_path('play')
context = kodion.Context(path=path, params={'video_id': 'puMYeBRTsHs'})
result = provider.navigate(context)
items = result[0]
pass
示例2: test_on_channel
def test_on_channel(self):
provider = Provider()
path = kodion.utils.create_path('channel', 'UCDbAn9LEzqONk__uXA6a9jQ')
context = kodion.Context(path=path)
result = provider.navigate(context)
items = result[0]
pass
示例3: test_on_channel_playlist
def test_on_channel_playlist(self):
provider = Provider()
path = kodion.utils.create_path('channel', 'some_channel_id', 'playlist', 'UUDbAn9LEzqONk__uXA6a9jQ')
context = kodion.Context(path=path)
context.set_localization(30502, 'Go to %s')
result = provider.navigate(context)
items = result[0]
pass
示例4: test_play
def test_play(self):
provider = Provider()
path = kodion.utils.create_path('play')
context = kodion.Context(path=path, params={'video_id': 'ZCBlKMZLxZA'})
context.set_localization(30502, 'Go to %s')
result = provider.navigate(context)
items = result[0]
pass
示例5: test_channel_by_name
def test_channel_by_name(self):
provider = Provider()
path = kodion.utils.create_path('user', 'Gronkh')
context = kodion.Context(path=path)
context.set_localization(30502, 'Go to %s')
result = provider.navigate(context)
items = result[0]
pass
示例6: test_playlist
def test_playlist(self):
provider = Provider()
path = kodion.utils.create_path('playlist', 'LL9DDFrb_dGvEvcTrzNn5LpA')
context = kodion.Context(path=path)
context.set_localization(30502, 'Go to %s')
result = provider.navigate(context)
items = result[0]
pass
示例7: test_description_links
def test_description_links(self):
provider = Provider()
path = kodion.utils.create_path('special', 'description_links')
context = kodion.Context(path=path, params={'video_id': 'QEwEWKbWnaQ'})
context.set_localization(30502, 'Go to %s')
result = provider.navigate(context)
items = result[0]
pass
示例8: test_get_fanarts
def test_get_fanarts(self):
provider = Provider()
context = kodion.Context()
resource_manager = ResourceManager(context, provider.get_client(context))
resource_manager.clear()
fanarts = resource_manager.get_fanarts(["UCDbAn9LEzqONk__uXA6a9jQ", "UC8i4HhaJSZhm-fu84Bl72TA"])
fanarts = resource_manager.get_fanarts(["UCDbAn9LEzqONk__uXA6a9jQ", "UC8i4HhaJSZhm-fu84Bl72TA"])
pass
示例9: test_get_related_playlists
def test_get_related_playlists(self):
provider = Provider()
context = kodion.Context()
resource_manager = ResourceManager(context, provider.get_client(context))
resource_manager.clear()
playlists = resource_manager.get_related_playlists("UCDbAn9LEzqONk__uXA6a9jQ")
playlists = resource_manager.get_related_playlists("UCDbAn9LEzqONk__uXA6a9jQ")
pass
示例10: test_on_search_video
def test_on_search_video(self):
provider = Provider()
path = kodion.utils.create_path(kodion.constants.paths.SEARCH, 'query')
context = kodion.Context(path=path, params={'q': 'lgr'})
result = provider.navigate(context)
items = result[0]
self.assertGreater(len(items), 0)
kodion.utils.print_items(items)
pass
示例11: test_on_search
def test_on_search(self):
provider = Provider()
path = kodion.utils.create_path('search')
context = kodion.Context(path=path, params={'q': 'The Breakfast Club é Extras'})
context.set_localization(30502, 'Go to %s')
result = provider.navigate(context)
items = result[0]
self.assertGreater(len(items), 0)
kodion.utils.print_items(items)
pass
示例12: test_on_root
def test_on_root(self):
provider = Provider()
context = kodion.Context(path='/')
result = provider.navigate(context)
items = result[0]
self.assertGreater(len(items), 0)
kodion.utils.print_items(items)
pass
示例13: test_on_search_playlist
def test_on_search_playlist(self):
provider = Provider()
path = kodion.utils.create_path(kodion.constants.paths.SEARCH, 'query')
context = kodion.Context(path=path, params={'q': 'lgr', 'search_type': 'playlist'})
result = provider.navigate(context)
items = result[0]
self.assertGreater(len(items), 0)
kodion.utils.print_items(items)
context = context.clone(new_path=path, new_params={'q': 'lgr', 'search_type': 'playlist', 'page_token': 'CDIQAA'})
result = provider.navigate(context)
items = result[0]
self.assertGreater(len(items), 0)
kodion.utils.print_items(items)
pass