本文整理汇总了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
示例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
示例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)
示例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)
示例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)
示例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()))
示例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()
示例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