使用notepad ++更改Archive.org链接


0

我有一堆链接到archive.org文件夹,里面包含电影文件。例如:

https://archive.org/details/dmbb44435

电影文件名始终与文件夹名称相同。所以在上面的例子中,电影是dmbb44435.mp4。因此,完整的网址是:

https://archive.org/download/dmbb44435/dmbb44435.mp4

如何使用notepad ++使用find + replace将文件名添加到URL的末尾?谢谢


1
在替换窗口中:“查找内容”:^ https:\ / \ / archive \ .org \ / details \ /(。+)$“替换为”:https:// archive。组织/下载/ \ 1 / \ 1。mp4(无空格)检查搜索模式 - >正则表达式
格雷克

Answers:


2
  • Ctrl+H
  • 找什么: https://archive.org/\Kdetails(/.+?(?!\.mp4))
  • 用。。。来代替: download$1$1.mp4
  • 检查包裹
  • 检查正则表达式
  • Replace all

说明:

https://archive.org/    : literally
\K                      : forget all we have seen until this position
details                 : literally
(                       : start group 1
  /                     : a slash
  .+?                   : 1 or more any character but newline, not greedy
  (?!\.mp4)             : negative lookahead, to make sure we don't have ".mp4" after
)                       : end group 1

替换:

download        : literally
$1              : content of group 1
$1              : content of group 1
.mp4            : literally

给出示例的结果:

https://archive.org/download/dmbb44435/dmbb44435.mp4
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.