Twitter Media Download (2025.04.28 Fixed)

Download videoer/billeder med et enkelt klik, og support automatisk emballage som en zip -fil, der skal downloades, når batch -downloads. Støtt nyt API -interface

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

Skaber
焙多芬
Daglige installationer
2
Installationer i alt
141
Bedømmelser
1 0 0
Version
2025.05.25.0001
Oprettet
19.05.2026
Opdateret
25.05.2026
Size
77 kB
Kompatibilitet
Kompatibel med Firefox Kompatibel med Chrome Kompatibel med Opera Kompatibel med Safari Kompatibel med Edge Kompatibel med Brave
Licens
MIT
Gælder for

原脚本:https://greasyfork.org/zh-CN/scripts/423001-twitter-media-downloader/code

20260519:与idm冲突,下载的媒体文件都无法按照脚本中的文件命名规则保存

根因分析:

脚本使用 GM_download({ url, name }) 下载文件。name 参数是 Tampermonkey 内部使用的文件名,但 IDM 浏览器扩展会拦截所有 HTTP 下载请求,并忽略Tampermonkey 设置的文件名——IDM 只从 URL 路径或 Content-Disposition 头提取文件名。Twitter/X 现在的媒体 CDN URL 格式是 UUID(如 36695921-5be0-4d32-8eb1-5274cb330d1a.jpg),所以 IDM 保存的就是这个 UUID 名。

解决方案:

将下载方式从 GM_download(发起 HTTP 请求,会被 IDM 拦截)改为 fetch → Blob → 方式。blob:// URL 不是 HTTP 请求,IDM 无法拦截,且 标签的 download 属性能强制指定文件名。