mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-01-27 16:47:52 +00:00
[ie/patreon] Extract attachment filename as alt_title
(#12000)
Authored by: msm595
This commit is contained in:
parent
13825ab778
commit
e2e73b5c65
@ -63,6 +63,7 @@ class PatreonIE(PatreonBaseIE):
|
||||
'info_dict': {
|
||||
'id': '743933',
|
||||
'ext': 'mp3',
|
||||
'alt_title': 'cd166.mp3',
|
||||
'title': 'Episode 166: David Smalley of Dogma Debate',
|
||||
'description': 'md5:34d207dd29aa90e24f1b3f58841b81c7',
|
||||
'uploader': 'Cognitive Dissonance Podcast',
|
||||
@ -280,7 +281,7 @@ def _real_extract(self, url):
|
||||
video_id = self._match_id(url)
|
||||
post = self._call_api(
|
||||
f'posts/{video_id}', video_id, query={
|
||||
'fields[media]': 'download_url,mimetype,size_bytes',
|
||||
'fields[media]': 'download_url,mimetype,size_bytes,file_name',
|
||||
'fields[post]': 'comment_count,content,embed,image,like_count,post_file,published_at,title,current_user_can_view',
|
||||
'fields[user]': 'full_name,url',
|
||||
'fields[post_tag]': 'value',
|
||||
@ -317,6 +318,7 @@ def _real_extract(self, url):
|
||||
'ext': ext,
|
||||
'filesize': size_bytes,
|
||||
'url': download_url,
|
||||
'alt_title': traverse_obj(media_attributes, ('file_name', {str})),
|
||||
})
|
||||
|
||||
elif include_type == 'user':
|
||||
|
Loading…
Reference in New Issue
Block a user