1
0
镜像自地址 https://git.sr.ht/~cadence/NewLeaf 已同步 2025-09-16 14:13:46 +00:00

Fix recommended videos extraction on some remaining IDs

Example: https://www.youtube.com/watch?v=-_GDl6cBebQ
2e9a445bc3/yt_dlp/extractor/common.py (L816)

Amends f22decbb
这个提交包含在:
Lomanic 2021-11-11 18:35:05 +01:00 提交者 Cadence Ember
父节点 e3854a6050
当前提交 8a13868db7
找不到此签名对应的密钥
GPG 密钥 ID: BC1C2C61CF521B17

查看文件

@ -3,12 +3,12 @@ import yt_dlp.utils
def get_created_files(id):
# youtube-dl transforms filenames when saving, for example changing - to _ at the start to presumbly not trigger switches in shell, but also in other strange ways too
sanitized_id = yt_dlp.utils.sanitize_filename(id)
sanitized_id = yt_dlp.utils.sanitize_filename(id, restricted=True)
# all file names then have an underscore before the converted URL
id += "_"
sanitized_id += "_"
return (f for f in os.listdir() if f.startswith(id) or f.startswith(sanitized_id))
return (f for f in os.listdir() if f.startswith(sanitized_id) or f.startswith(id))
def clean_up_temp_files(id):
created_files = get_created_files(id)