mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-07-19 01:16:40 +00:00
[ie/9gag] Support browser impersonation (#13678)
Closes #10837 Authored by: bashonly
This commit is contained in:
parent
805519bfaa
commit
0b359b184d
@ -1,6 +1,5 @@
|
|||||||
from .common import InfoExtractor
|
from .common import InfoExtractor
|
||||||
from ..utils import (
|
from ..utils import (
|
||||||
ExtractorError,
|
|
||||||
determine_ext,
|
determine_ext,
|
||||||
int_or_none,
|
int_or_none,
|
||||||
traverse_obj,
|
traverse_obj,
|
||||||
@ -61,10 +60,10 @@ class NineGagIE(InfoExtractor):
|
|||||||
post = self._download_json(
|
post = self._download_json(
|
||||||
'https://9gag.com/v1/post', post_id, query={
|
'https://9gag.com/v1/post', post_id, query={
|
||||||
'id': post_id,
|
'id': post_id,
|
||||||
})['data']['post']
|
}, impersonate=True)['data']['post']
|
||||||
|
|
||||||
if post.get('type') != 'Animated':
|
if post.get('type') != 'Animated':
|
||||||
raise ExtractorError(
|
self.raise_no_formats(
|
||||||
'The given url does not contain a video',
|
'The given url does not contain a video',
|
||||||
expected=True)
|
expected=True)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user