File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change 2
2
3
3
from .common import InfoExtractor
4
4
from ..utils import (
5
- determine_ext ,
6
5
ExtractorError ,
6
+ determine_ext ,
7
7
int_or_none ,
8
8
try_get ,
9
+ unescapeHTML ,
9
10
url_or_none ,
10
11
)
11
12
@@ -14,7 +15,7 @@ class NineGagIE(InfoExtractor):
14
15
IE_NAME = '9gag'
15
16
_VALID_URL = r'https?://(?:www\.)?9gag\.com/gag/(?P<id>[^/?&#]+)'
16
17
17
- _TEST = {
18
+ _TESTS = [ {
18
19
'url' : 'https://9gag.com/gag/ae5Ag7B' ,
19
20
'info_dict' : {
20
21
'id' : 'ae5Ag7B' ,
@@ -29,7 +30,11 @@ class NineGagIE(InfoExtractor):
29
30
'dislike_count' : int ,
30
31
'comment_count' : int ,
31
32
}
32
- }
33
+ }, {
34
+ # HTML escaped title
35
+ 'url' : 'https://9gag.com/gag/av5nvyb' ,
36
+ 'only_matching' : True ,
37
+ }]
33
38
34
39
def _real_extract (self , url ):
35
40
post_id = self ._match_id (url )
@@ -43,7 +48,7 @@ def _real_extract(self, url):
43
48
'The given url does not contain a video' ,
44
49
expected = True )
45
50
46
- title = post ['title' ]
51
+ title = unescapeHTML ( post ['title' ])
47
52
48
53
duration = None
49
54
formats = []
You can’t perform that action at this time.
0 commit comments