diff options
author | pukkandan <pukkandan@gmail.com> | 2021-02-20 02:14:36 +0530 |
---|---|---|
committer | pukkandan <pukkandan@gmail.com> | 2021-02-20 02:32:22 +0530 |
commit | bc2ca1bb75d586b75d83a6f60b680ee07227ff28 (patch) | |
tree | e00af2ced38c0a0c1dfead4d27f3edba9c9651e4 /youtube_dlc/extractor/ninegag.py | |
parent | 5e41dca334b152d3757cff318c5f72843aeea255 (diff) | |
download | hypervideo-pre-bc2ca1bb75d586b75d83a6f60b680ee07227ff28.tar.lz hypervideo-pre-bc2ca1bb75d586b75d83a6f60b680ee07227ff28.tar.xz hypervideo-pre-bc2ca1bb75d586b75d83a6f60b680ee07227ff28.zip |
Update to ytdl-commit-cf2dbec
https://github.com/ytdl-org/youtube-dl/commit/cf2dbec6301177a1fddf72862de05fa912d9869d
Except: [kakao] improve info extraction and detect geo restriction
https://github.com/ytdl-org/youtube-dl/commit/d8085580f63ad3b146a31712ff76cf41d5a4558a
Diffstat (limited to 'youtube_dlc/extractor/ninegag.py')
-rw-r--r-- | youtube_dlc/extractor/ninegag.py | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/youtube_dlc/extractor/ninegag.py b/youtube_dlc/extractor/ninegag.py index 440f865bc..14390823b 100644 --- a/youtube_dlc/extractor/ninegag.py +++ b/youtube_dlc/extractor/ninegag.py @@ -2,10 +2,11 @@ from __future__ import unicode_literals from .common import InfoExtractor from ..utils import ( - determine_ext, ExtractorError, + determine_ext, int_or_none, try_get, + unescapeHTML, url_or_none, ) @@ -14,7 +15,7 @@ class NineGagIE(InfoExtractor): IE_NAME = '9gag' _VALID_URL = r'https?://(?:www\.)?9gag\.com/gag/(?P<id>[^/?&#]+)' - _TEST = { + _TESTS = [{ 'url': 'https://9gag.com/gag/ae5Ag7B', 'info_dict': { 'id': 'ae5Ag7B', @@ -29,7 +30,11 @@ class NineGagIE(InfoExtractor): 'dislike_count': int, 'comment_count': int, } - } + }, { + # HTML escaped title + 'url': 'https://9gag.com/gag/av5nvyb', + 'only_matching': True, + }] def _real_extract(self, url): post_id = self._match_id(url) @@ -43,7 +48,7 @@ class NineGagIE(InfoExtractor): 'The given url does not contain a video', expected=True) - title = post['title'] + title = unescapeHTML(post['title']) duration = None formats = [] |