本文整理汇总了Python中YouTubePlaylistControl.YouTubePlaylistControl.getLikedVideos方法的典型用法代码示例。如果您正苦于以下问题:Python YouTubePlaylistControl.getLikedVideos方法的具体用法?Python YouTubePlaylistControl.getLikedVideos怎么用?Python YouTubePlaylistControl.getLikedVideos使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类YouTubePlaylistControl.YouTubePlaylistControl
的用法示例。
在下文中一共展示了YouTubePlaylistControl.getLikedVideos方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_getLikedVideos_should_call_core_getBatchDetails_if_scraper_succeded
# 需要导入模块: from YouTubePlaylistControl import YouTubePlaylistControl [as 别名]
# 或者: from YouTubePlaylistControl.YouTubePlaylistControl import getLikedVideos [as 别名]
def test_getLikedVideos_should_call_core_getBatchDetails_if_scraper_succeded(self):
sys.modules["__main__"].scraper.scrapeUserLikedVideos.return_value = ("",200)
sys.modules["__main__"].core.getBatchDetails.return_value = ("",200)
control = YouTubePlaylistControl()
control.getLikedVideos({"login":"true","scraper":"liked_videos"})
sys.modules["__main__"].scraper.scrapeUserLikedVideos.assert_called_with({"login":"true","scraper":"liked_videos"})
示例2: test_playAll_should_call_getLikedVideos_if_scraper_is_liked_videos_in_params
# 需要导入模块: from YouTubePlaylistControl import YouTubePlaylistControl [as 别名]
# 或者: from YouTubePlaylistControl.YouTubePlaylistControl import getLikedVideos [as 别名]
def test_playAll_should_call_getLikedVideos_if_scraper_is_liked_videos_in_params(self):
control = YouTubePlaylistControl()
control.getLikedVideos = Mock()
control.getLikedVideos.return_value = ("",200)
control.playAll({"scraper":"liked_videos"})
control.getLikedVideos.assert_called_with({"scraper":"liked_videos", 'fetch_all': 'true'})
示例3: test_getLikedVideos_should_exit_cleanly_if_scraper_or_login_is_not_in_params
# 需要导入模块: from YouTubePlaylistControl import YouTubePlaylistControl [as 别名]
# 或者: from YouTubePlaylistControl.YouTubePlaylistControl import getLikedVideos [as 别名]
def test_getLikedVideos_should_exit_cleanly_if_scraper_or_login_is_not_in_params(self):
control = YouTubePlaylistControl()
control.getLikedVideos({})
assert(sys.modules["__main__"].scraper.scrapeUserLikedVideos.call_count == 0)