1
0
Fork 0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-03-09 12:50:23 -05:00

[ie/pinterest] Fix extractor

Authored by: mikf
This commit is contained in:
=?UTF-8?q?Mike=20F=C3=A4hrmann?= 2025-03-05 00:25:38 -06:00 committed by bashonly
parent 9d70abe4de
commit b461f3f834
No known key found for this signature in database
GPG key ID: 783F096F253D15B0

View file

@ -23,9 +23,9 @@ class PinterestBaseIE(InfoExtractor):
def _call_api(self, resource, video_id, options):
return self._download_json(
f'https://www.pinterest.com/resource/{resource}Resource/get/',
video_id, f'Download {resource} JSON metadata', query={
'data': json.dumps({'options': options}),
})['resource_response']
video_id, f'Download {resource} JSON metadata',
query={'data': json.dumps({'options': options})},
headers={'X-Pinterest-PWS-Handler': 'www/[username].js'})['resource_response']
def _extract_video(self, data, extract_formats=True):
video_id = data['id']