File tree Expand file tree Collapse file tree 2 files changed +26
-9
lines changed Expand file tree Collapse file tree 2 files changed +26
-9
lines changed Original file line number Diff line number Diff line change @@ -70,15 +70,6 @@ def test_youtube_feeds(self):
70
70
# self.assertMatch('http://www.youtube.com/results?search_query=making+mustard', ['youtube:search_url'])
71
71
# self.assertMatch('https://www.youtube.com/results?baz=bar&search_query=youtube-dl+test+video&filters=video&lclk=video', ['youtube:search_url'])
72
72
73
- def test_youtube_extract (self ):
74
- assertExtractId = lambda url , id : self .assertEqual (YoutubeIE .extract_id (url ), id )
75
- assertExtractId ('http://www.youtube.com/watch?&v=BaW_jenozKc' , 'BaW_jenozKc' )
76
- assertExtractId ('https://www.youtube.com/watch?&v=BaW_jenozKc' , 'BaW_jenozKc' )
77
- assertExtractId ('https://www.youtube.com/watch?feature=player_embedded&v=BaW_jenozKc' , 'BaW_jenozKc' )
78
- assertExtractId ('https://www.youtube.com/watch_popup?v=BaW_jenozKc' , 'BaW_jenozKc' )
79
- assertExtractId ('http://www.youtube.com/watch?v=BaW_jenozKcsharePLED17F32AD9753930' , 'BaW_jenozKc' )
80
- assertExtractId ('BaW_jenozKc' , 'BaW_jenozKc' )
81
-
82
73
def test_facebook_matching (self ):
83
74
self .assertTrue (FacebookIE .suitable ('https://www.facebook.com/Shiniknoh#!/photo.php?v=10153317450565268' ))
84
75
self .assertTrue (FacebookIE .suitable ('https://www.facebook.com/cindyweather?fref=ts#!/photo.php?v=10152183998945793' ))
Original file line number Diff line number Diff line change
1
+ #!/usr/bin/env python
2
+ from __future__ import unicode_literals
3
+
4
+ # Allow direct execution
5
+ import os
6
+ import sys
7
+ import unittest
8
+ sys .path .insert (0 , os .path .dirname (os .path .dirname (os .path .abspath (__file__ ))))
9
+
10
+
11
+ from youtube_dl .extractor import YoutubeIE
12
+
13
+
14
+ class TestYoutubeMisc (unittest .TestCase ):
15
+ def test_youtube_extract (self ):
16
+ assertExtractId = lambda url , id : self .assertEqual (YoutubeIE .extract_id (url ), id )
17
+ assertExtractId ('http://www.youtube.com/watch?&v=BaW_jenozKc' , 'BaW_jenozKc' )
18
+ assertExtractId ('https://www.youtube.com/watch?&v=BaW_jenozKc' , 'BaW_jenozKc' )
19
+ assertExtractId ('https://www.youtube.com/watch?feature=player_embedded&v=BaW_jenozKc' , 'BaW_jenozKc' )
20
+ assertExtractId ('https://www.youtube.com/watch_popup?v=BaW_jenozKc' , 'BaW_jenozKc' )
21
+ assertExtractId ('http://www.youtube.com/watch?v=BaW_jenozKcsharePLED17F32AD9753930' , 'BaW_jenozKc' )
22
+ assertExtractId ('BaW_jenozKc' , 'BaW_jenozKc' )
23
+
24
+
25
+ if __name__ == '__main__' :
26
+ unittest .main ()
You can’t perform that action at this time.
0 commit comments