mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-07-18 17:11:31 +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 ..utils import (
|
||||
ExtractorError,
|
||||
determine_ext,
|
||||
int_or_none,
|
||||
traverse_obj,
|
||||
@ -61,10 +60,10 @@ class NineGagIE(InfoExtractor):
|
||||
post = self._download_json(
|
||||
'https://9gag.com/v1/post', post_id, query={
|
||||
'id': post_id,
|
||||
})['data']['post']
|
||||
}, impersonate=True)['data']['post']
|
||||
|
||||
if post.get('type') != 'Animated':
|
||||
raise ExtractorError(
|
||||
self.raise_no_formats(
|
||||
'The given url does not contain a video',
|
||||
expected=True)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user