本文整理汇总了Python中pytvdbapi.api.TVDB.get_episode方法的典型用法代码示例。如果您正苦于以下问题:Python TVDB.get_episode方法的具体用法?Python TVDB.get_episode怎么用?Python TVDB.get_episode使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pytvdbapi.api.TVDB
的用法示例。
在下文中一共展示了TVDB.get_episode方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_default_order
# 需要导入模块: from pytvdbapi.api import TVDB [as 别名]
# 或者: from pytvdbapi.api.TVDB import get_episode [as 别名]
def test_default_order(self):
"""It should be possible to get an episode using the default sort order"""
api = TVDB("B43FF87DE395DF56")
ep = api.get_episode(0, "en", "default", True, seriesid=79349, seasonnumber=2, episodenumber=5)
self.assertEqual(ep.absolute_number, 17)
示例2: test_episode_id_kwarg
# 需要导入模块: from pytvdbapi.api import TVDB [as 别名]
# 或者: from pytvdbapi.api.TVDB import get_episode [as 别名]
def test_episode_id_kwarg(self):
"""It should be possible to load the episode passing the episode id as a kwarg"""
api = TVDB("B43FF87DE395DF56")
ep = api.get_episode(0, "en", "id", True, episodeid=308834)
self.assertEqual(ep.id, 308834)
self.assertEqual(ep.EpisodeName, 'Crocodile')
示例3: test_missing_id
# 需要导入模块: from pytvdbapi.api import TVDB [as 别名]
# 或者: from pytvdbapi.api.TVDB import get_episode [as 别名]
def test_missing_id(self):
"""It should be possible to call get_episode without passing id as positional argument"""
api = TVDB("B43FF87DE395DF56")
ep = api.get_episode("en", "id", True, episodeid=308834)
self.assertEqual(ep.id, 308834)
self.assertEqual(ep.EpisodeName, 'Crocodile')
示例4: test_get_episode
# 需要导入模块: from pytvdbapi.api import TVDB [as 别名]
# 或者: from pytvdbapi.api.TVDB import get_episode [as 别名]
def test_get_episode(self):
"""
Provided the episode id, you should be able to
get episode instance.
"""
api = TVDB("B43FF87DE395DF56")
ep = api.get_episode(308834, "en")
self.assertEqual(ep.id, 308834)
self.assertEqual(ep.EpisodeName, 'Crocodile')
示例5: test_absolute_order
# 需要导入模块: from pytvdbapi.api import TVDB [as 别名]
# 或者: from pytvdbapi.api.TVDB import get_episode [as 别名]
def test_absolute_order(self):
"""it should be possible to get an episode using absolute number"""
api = TVDB("B43FF87DE395DF56")
ep = api.get_episode(0, "en", "absolute", True, seriesid=81797, absolutenumber=62)
self.assertEqual(ep.EpisodeName, "The First Obstacle? Giant Whale Laboon Appears")