當前位置: 首頁>>代碼示例>>Python>>正文


Python youtube.Provider類代碼示例

本文整理匯總了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
開發者ID:Razzeee,項目名稱:plugin.video.bromix.youtube,代碼行數:8,代碼來源:test_provider.py

示例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
開發者ID:RozebMomin,項目名稱:KodiAddons,代碼行數:8,代碼來源:test_provider.py

示例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
開發者ID:RozebMomin,項目名稱:KodiAddons,代碼行數:9,代碼來源:test_provider.py

示例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
開發者ID:RozebMomin,項目名稱:KodiAddons,代碼行數:9,代碼來源:test_provider.py

示例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
開發者ID:RozebMomin,項目名稱:KodiAddons,代碼行數:9,代碼來源:test_provider.py

示例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
開發者ID:RozebMomin,項目名稱:KodiAddons,代碼行數:9,代碼來源:test_provider.py

示例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
開發者ID:RozebMomin,項目名稱:KodiAddons,代碼行數:9,代碼來源:test_provider.py

示例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
開發者ID:terreur69,項目名稱:plugin.video.youtube,代碼行數:9,代碼來源:test_resource_manager.py

示例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
開發者ID:terreur69,項目名稱:plugin.video.youtube,代碼行數:9,代碼來源:test_resource_manager.py

示例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
開發者ID:Razzeee,項目名稱:plugin.video.bromix.youtube,代碼行數:10,代碼來源:test_provider.py

示例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
開發者ID:RozebMomin,項目名稱:KodiAddons,代碼行數:11,代碼來源:test_provider.py

示例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
開發者ID:RozebMomin,項目名稱:KodiAddons,代碼行數:11,代碼來源:test_provider.py

示例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
開發者ID:RozebMomin,項目名稱:KodiAddons,代碼行數:16,代碼來源:test_provider.py


注:本文中的resources.lib.youtube.Provider類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。