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


Python Provider.navigate方法代碼示例

本文整理匯總了Python中resources.lib.youtube.Provider.navigate方法的典型用法代碼示例。如果您正苦於以下問題:Python Provider.navigate方法的具體用法?Python Provider.navigate怎麽用?Python Provider.navigate使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在resources.lib.youtube.Provider的用法示例。


在下文中一共展示了Provider.navigate方法的11個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: test_on_search_playlist

# 需要導入模塊: from resources.lib.youtube import Provider [as 別名]
# 或者: from resources.lib.youtube.Provider import navigate [as 別名]
    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,代碼行數:18,代碼來源:test_provider.py

示例2: test_play

# 需要導入模塊: from resources.lib.youtube import Provider [as 別名]
# 或者: from resources.lib.youtube.Provider import navigate [as 別名]
    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,代碼行數:10,代碼來源:test_provider.py

示例3: test_on_channel

# 需要導入模塊: from resources.lib.youtube import Provider [as 別名]
# 或者: from resources.lib.youtube.Provider import navigate [as 別名]
    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,代碼行數:10,代碼來源:test_provider.py

示例4: test_on_channel_playlist

# 需要導入模塊: from resources.lib.youtube import Provider [as 別名]
# 或者: from resources.lib.youtube.Provider import navigate [as 別名]
    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,代碼行數:11,代碼來源:test_provider.py

示例5: test_play

# 需要導入模塊: from resources.lib.youtube import Provider [as 別名]
# 或者: from resources.lib.youtube.Provider import navigate [as 別名]
    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,代碼行數:11,代碼來源:test_provider.py

示例6: test_channel_by_name

# 需要導入模塊: from resources.lib.youtube import Provider [as 別名]
# 或者: from resources.lib.youtube.Provider import navigate [as 別名]
    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,代碼行數:11,代碼來源:test_provider.py

示例7: test_playlist

# 需要導入模塊: from resources.lib.youtube import Provider [as 別名]
# 或者: from resources.lib.youtube.Provider import navigate [as 別名]
    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,代碼行數:11,代碼來源:test_provider.py

示例8: test_description_links

# 需要導入模塊: from resources.lib.youtube import Provider [as 別名]
# 或者: from resources.lib.youtube.Provider import navigate [as 別名]
    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,代碼行數:11,代碼來源:test_provider.py

示例9: test_on_search_video

# 需要導入模塊: from resources.lib.youtube import Provider [as 別名]
# 或者: from resources.lib.youtube.Provider import navigate [as 別名]
    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,代碼行數:12,代碼來源:test_provider.py

示例10: test_on_search

# 需要導入模塊: from resources.lib.youtube import Provider [as 別名]
# 或者: from resources.lib.youtube.Provider import navigate [as 別名]
    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,代碼行數:13,代碼來源:test_provider.py

示例11: test_on_root

# 需要導入模塊: from resources.lib.youtube import Provider [as 別名]
# 或者: from resources.lib.youtube.Provider import navigate [as 別名]
    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,代碼行數:13,代碼來源:test_provider.py


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