1
0
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:
bashonly 2025-07-09 16:58:19 -05:00 committed by GitHub
parent 805519bfaa
commit 0b359b184d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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)