Skip to content

[twitter-media-downloader] 当{full-text}遇到空文本会拒绝下载 #294

@21stcenturycoomer

Description

@21stcenturycoomer

Expected Behavior

下载只有图片没有文本的推时应该跳过{full-text}正常下载。

Actual Behavior

有{full-text} 时点击下载会不停转圈。

Steps to Reproduce

  1. File Name Pattern输入{full-text} {file-name} {user-name}
  2. 点击纯图片的下载键

Script Manager or Browser

TamperMonkey

Script Manager or Browser Version

No response

Browser and Engine Version

Brave 1.90.122

Operating System

Windows 10

Script Version

Twitter 媒体下载 (2025.12.02 修复)

Additional Information


info.out = (out.replace(/.?{file-ext}/, '') + ((medias.length > 1 || index) && !out.match('{file-name}') ? '-' + (index ? index - 1 : i) : '') + '.{file-ext}').replace(/{([^{}:]+)(:[^{}]+)?}/g, (match, name) => info[name])
改成
info.out = (out.replace(/.?{file-ext}/, '') + ((medias.length > 1 || index) && !out.match('{file-name}') ? '-' + (index ? index - 1 : i) : '') + '.{file-ext}')
.replace(/{([^{}:]+)(:[^{}]+)?}/g, (match, name) => info[name])
.replace(/\s+/g, ' ')
.replace(/\s+./g, '.')
.trim()
即可修复

I confirm the bug really exists

  • This bug really exists, please fix it as soon as possible

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions