当前位置: 首页>>代码示例>>Python>>正文


Python TVDB.get_series方法代码示例

本文整理汇总了Python中pytvdbapi.api.TVDB.get_series方法的典型用法代码示例。如果您正苦于以下问题:Python TVDB.get_series方法的具体用法?Python TVDB.get_series怎么用?Python TVDB.get_series使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在pytvdbapi.api.TVDB的用法示例。


在下文中一共展示了TVDB.get_series方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: test_zap2it_id

# 需要导入模块: from pytvdbapi.api import TVDB [as 别名]
# 或者: from pytvdbapi.api.TVDB import get_series [as 别名]
    def test_zap2it_id(self):
        """It should be possible to load the show using the zap2it id"""
        api = TVDB("B43FF87DE395DF56")

        show = api.get_series('EP00859795', 'en', 'zap2it')
        self.assertEqual(show.seriesid, 79349)  # Dexter

        show = api.get_series(859795, 'en', 'zap2it')
        self.assertEqual(show.seriesid, 79349)  # Dexter
开发者ID:fuzzycode,项目名称:pytvdbapi,代码行数:11,代码来源:test_api.py

示例2: test_imdb_id

# 需要导入模块: from pytvdbapi.api import TVDB [as 别名]
# 或者: from pytvdbapi.api.TVDB import get_series [as 别名]
    def test_imdb_id(self):
        """It should be possible to use the imdb id to get the series"""
        api = TVDB("B43FF87DE395DF56")

        show = api.get_series(773262, 'en', 'imdb')
        self.assertEqual(show.seriesid, 79349)  # Dexter

        show = api.get_series('tt0773262', 'en', 'imdb')
        self.assertEqual(show.seriesid, 79349)  # Dexter
开发者ID:fuzzycode,项目名称:pytvdbapi,代码行数:11,代码来源:test_api.py

示例3: test_get

# 需要导入模块: from pytvdbapi.api import TVDB [as 别名]
# 或者: from pytvdbapi.api.TVDB import get_series [as 别名]
    def test_get(self):
        """Provided the show id, you should be able to get the show object"""
        api = TVDB("B43FF87DE395DF56")
        show = api.get_series(79349, "en")

        self.assertEqual(show.SeriesName, "Dexter")
        self.assertEqual(show.id, 79349)
开发者ID:adamcw,项目名称:pytvdbapi,代码行数:9,代码来源:test_api.py

示例4: test_no_actors

# 需要导入模块: from pytvdbapi.api import TVDB [as 别名]
# 或者: from pytvdbapi.api.TVDB import get_series [as 别名]
    def test_no_actors(self):
        """
        The Show instance should have an empty actor_objects when the
        actor data has not been loaded.
        """
        api = TVDB("B43FF87DE395DF56", actors=False)
        show = api.get_series(79349, "en")  # Load the series Dexter
        show.update()

        self.assertEqual(len(show.actor_objects), 0)
开发者ID:fuzzycode,项目名称:pytvdbapi,代码行数:12,代码来源:test_actors.py

示例5: test_get_series

# 需要导入模块: from pytvdbapi.api import TVDB [as 别名]
# 或者: from pytvdbapi.api.TVDB import get_series [as 别名]
    def test_get_series(self):
        """
        It should be possible to use the get_series alias to get a show
        given the right show id.
        """
        api = TVDB("B43FF87DE395DF56")
        show = api.get_series(79349, "en")

        self.assertEqual(show.SeriesName, "Dexter")
        self.assertEqual(show.id, 79349)
开发者ID:BenoitZugmeyer,项目名称:pytvdbapi,代码行数:12,代码来源:test_api.py

示例6: test_insensitive_attributes

# 需要导入模块: from pytvdbapi.api import TVDB [as 别名]
# 或者: from pytvdbapi.api.TVDB import get_series [as 别名]
    def test_insensitive_attributes(self):
        """If selected, it should be possible to access the attributes in a case insensitive manner"""

        api = TVDB("B43FF87DE395DF56", actors=True, ignore_case=True)
        show = api.get_series(79349, "en")  # Load the series Dexter
        show.update()

        actor = show.actor_objects[0]
        for a in dir(actor):
            self.assertTrue(hasattr(actor, a))
            self.assertTrue(hasattr(actor, a.lower()))
            self.assertTrue(hasattr(actor, a.upper()))
开发者ID:fuzzycode,项目名称:pytvdbapi,代码行数:14,代码来源:test_actors.py

示例7: setUp

# 需要导入模块: from pytvdbapi.api import TVDB [as 别名]
# 或者: from pytvdbapi.api.TVDB import get_series [as 别名]
 def setUp(self):
     api = TVDB("B43FF87DE395DF56", actors=True)
     self.show = api.get_series(79349, "en")  # Load the series Dexter
     self.show.update()
开发者ID:fuzzycode,项目名称:pytvdbapi,代码行数:6,代码来源:test_actors.py

示例8: _getShow

# 需要导入模块: from pytvdbapi.api import TVDB [as 别名]
# 或者: from pytvdbapi.api.TVDB import get_series [as 别名]
    def _getShow(self, _banners=True):
        api = TVDB("B43FF87DE395DF56", banners=_banners)
        show = api.get_series(79349, "en")  # Load the series Dexter
        show.update()

        return show
开发者ID:fuzzycode,项目名称:pytvdbapi,代码行数:8,代码来源:test_banner.py


注:本文中的pytvdbapi.api.TVDB.get_series方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。