+ assertChannel = lambda url: self.assertMatch(url, ['youtube:channel'])
+ assertChannel('https://www.youtube.com/channel/HCtnHdj3df7iM')
+ assertChannel('https://www.youtube.com/channel/HCtnHdj3df7iM?feature=gb_ch_rec')
+ assertChannel('https://www.youtube.com/channel/HCtnHdj3df7iM/videos')
+
+ def test_youtube_user_matching(self):
+ self.assertMatch('www.youtube.com/NASAgovVideo/videos', ['youtube:user'])
+
+ def test_youtube_feeds(self):
+ self.assertMatch('https://www.youtube.com/feed/watch_later', ['youtube:watch_later'])
+ self.assertMatch('https://www.youtube.com/feed/subscriptions', ['youtube:subscriptions'])
+ self.assertMatch('https://www.youtube.com/feed/recommended', ['youtube:recommended'])
+ self.assertMatch('https://www.youtube.com/my_favorites', ['youtube:favorites'])
+
+ def test_youtube_show_matching(self):
+ self.assertMatch('http://www.youtube.com/show/airdisasters', ['youtube:show'])
+
+ def test_justin_tv_channelid_matching(self):
+ self.assertTrue(JustinTVIE.suitable(u"justin.tv/vanillatv"))
+ self.assertTrue(JustinTVIE.suitable(u"twitch.tv/vanillatv"))
+ self.assertTrue(JustinTVIE.suitable(u"www.justin.tv/vanillatv"))
+ self.assertTrue(JustinTVIE.suitable(u"www.twitch.tv/vanillatv"))
+ self.assertTrue(JustinTVIE.suitable(u"http://www.justin.tv/vanillatv"))
+ self.assertTrue(JustinTVIE.suitable(u"http://www.twitch.tv/vanillatv"))
+ self.assertTrue(JustinTVIE.suitable(u"http://www.justin.tv/vanillatv/"))
+ self.assertTrue(JustinTVIE.suitable(u"http://www.twitch.tv/vanillatv/"))
+
+ def test_justintv_videoid_matching(self):
+ self.assertTrue(JustinTVIE.suitable(u"http://www.twitch.tv/vanillatv/b/328087483"))
+
+ def test_justin_tv_chapterid_matching(self):
+ self.assertTrue(JustinTVIE.suitable(u"http://www.twitch.tv/tsm_theoddone/c/2349361"))