GithubHelp home page GithubHelp logo

ausaki / subfinder Goto Github PK

View Code? Open in Web Editor NEW
828.0 31.0 96.0 1.87 MB

字幕查找器

License: MIT License

Python 98.83% Shell 0.60% Batchfile 0.57%
subfinder shooter subtitles finder subtitle subtitle-finder

subfinder's Introduction

subfinder 字幕查找器

subfinder 是一个通用字幕查找器,可以查找字幕并下载。


PyPi PyPi - Python Version PyPI - License GitHub last commit


Table of Contents


特性

安装

如果你是 Linux 和 macOS 用户,由于系统自带 Python,推荐使用下面的方法安装 subfinder:

pip install subfinder

安装完成之后,会在 Python 的 scripts 目录下添加一个叫做 subfinder 的可执行文件。

在 unix-like 系统中,scripts 目录一般是 /usr/local/bin,在 Windows 系统中,scripts 目录一般是 C:\python\scripts\。在 Windows 系统中需要将 C:\python\scripts\ 加入到 PATH 中(一般安装 Python 时已经添加了)。

接下来你就可以在命令行中使用 subfinder 命令了。

为了方便没有安装 Python 的用户,这里也有已经打包好的可执行文件。戳这里下载

更新

如果 subfinder 是使用 pip 安装的,那么使用 pip 更新,

pip install subfinder --upgrade

如果 subfinder 是下载的打包好的可执行文件,那么请重新下载最新的可执行文件并覆盖旧的文件。

使用方法

命令行

  • 使用默认字幕查找器(shooter)查找单个视频的字幕:

    subfinder /path/to/videofile

  • 使用默认字幕查找器(shooter)查找目录下(递归所有子目录)所有视频的字幕:

    subfinder /path/to/directory_contains_video

  • 使用指定的字幕查找器查找字幕,例如 zimuku:

    subfinder /path/to/videofile -m zimuku

  • 同时使用多个字幕查找器查找字幕

    subfinder /path/to/videofile -m shooter zimuku

    当指定多个字幕查找器时,subfinder 会依次尝试每个字幕查找器去查找字幕,只要有一个字幕查找器返回字幕信息,则不再使用后面的字幕查找器查找字幕。

    ** 注意:** 如果指定了多个字幕查找器,请不要指定 languages 参数,否则可能会出现 LanguageError 错误(因为每个 SubSearcher 支持的语言可能不相同)。

常用参数说明(详细的参数信息请查看 subfinder -h):

参数 含义 必需
-l, --languages 指定字幕语言,可同时指定多个。每个字幕查找器支持的语言不相同。具体支持的语言请看下文。 否,subfinder 默认会下载字幕查找器找到的所有字幕。
-e, --exts 指定字幕文件格式,可同时指定多个。每个字幕查找器支持的文件格式不相同。具体支持的文件格式请看下文。 否,subfinder 默认会下载字幕查找器找到的所有字幕。
-m,--method 指定字幕查找器,可同时指定多个。 否,subfinder 默认使用 shooter 查找字幕。
-k, --keyword 手动搜索关键字. 当 SubFinder 使用本身的关键字无法搜索到字幕时, 可以通过这个参数手动指定关键字.
--video_exts 视频文件的后缀名(包括.,例如. mp4)
--ignore 忽略本地已有的字幕强行查找字幕. 注意: 这可能会覆盖本地已有的字幕. 默认 False。
--exclude 排除文件或目录,支持类似于 shell 的文件匹配模式。详情见下文
--api_urls 指定字幕搜索器的 API URL。详情见下文
--no-order-marker SubFinder 默认会向字幕文件名中添加数字编号, 方便对字幕进行排序. 如果指定该选项, 则 SubFinder 不添加数字编号
-c, --conf 配置文件 否,SubFinder 默认从~/.subfinder.json 读取。
-s,--silence 静默运行,不输出日志
--debug 调试模式,输出调试日志
-h,--help 显示帮助信息
  • --exclude, 支持的匹配模式类似于 shell,* 匹配任意长度的字符串,? 匹配一个字符,[CHARS] 匹配 CHARS 中的任一字符。例如:

    • 排除包含 abc 的目录:--exclude '*abc*/'。注意添加单引号,防止 shell 对其进行扩展。

    • 排除包含 abc 的文件:--exclude '*abc*'。注意和上个例子的区别,匹配目录时结尾有 / 目录分隔符,匹配文件则没有。

  • --api_urls

    字幕库 的链接不太稳定,有时候会更换域名,因此提供 --api_urls 选项自定义 API URL,以防域名或链接变动。

    --api_urls 只接收 JSON 格式的字符串。

    获取正确的 API URL 的方法:

    如果发现字幕网站的 API URL 发生改变, 欢迎提交 issue.

    配置示例:

    {
      // 设置字幕库的搜索 API
      "zimuku": "http://www.zimuku.la/search",
      // 设置 SubHD 的搜索 API
      "subhd": "https://subhd.tv/search",
      // 设置 SubHD 获取字幕下载链接的 API, 注意不包含域名
      "subhd_api_subtitle_download": "/ajax/down_ajax",
      // 设置 SubHD 获取字幕预览的 API, 注意不包含域名
      "subhd_api_subtitle_preview": "/ajax/file_ajax"
    }

支持的语言和文件格式:

字幕查找器 语言 文件格式
shooter ['zh', 'en'] ['ass', 'srt']
zimuku ['zh_chs', 'zh_cht', 'en', 'zh_en'] ['ass', 'srt']
subhd ['zh_chs', 'zh_cht', 'en', 'zh_en'] ['ass', 'srt']

语言代码:

代码 含义
zh 中文,简体或者繁体
en 英文
zh_chs 简体中文
zh_cht 繁体中文
zh_en 双语

字幕文件的数字编号

默认的排序规则是:

LANGUAGE_PRIORITY = {"zh_en": 1, "zh_chs": 2, "zh": 3, "zh_cht": 4, "en": 5}
EXT_PRIORITY = {"ass": 1, "ssa": 2, "srt": 3}

如果字幕是中英双语, 那么优先级等于 1, 如果是中文简体, 那么优先级等于 2, 依次类推.

如果字幕是 ass 格式, 那么优先级是 1, 依次类推.

最终优先级等于 语言优先级 * 10 + 格式优先级.

字幕文件名中的数字编号就等于最终优先级, 因此, 优先级越低对应的数字编号越小, 播放器在排序时其顺序越靠前.

注意: 可以使用 -l-e 选项自定义优先级, 第一个参数值优先级等于 1, 第二个参数值优先级等于 2, 以此类推.

配置文件

配置文件是 JSON 格式的,支持命令行中的所有选项。命令行中指定的选项优先级高于配置文件的。

配置文件中的 key 一一对应于命令行选项,例如 -m,--method 对应的 key 为 method

示例:

{
  "languages": ["zh", "en", "zh_chs"],
  "exts": ["ass", "srt"],
  "method": ["shooter", "zimuku"],
  "video_exts": [".mp4", ".mkv", ".iso"],
  "exclude": ["excluded_path/", "*abc.mp4"],
  "api_urls": {
    // 设置字幕库的搜索 API
    "zimuku": "http://www.zimuku.la/search",
    // 设置 SubHD 的搜索 API
    "subhd": "https://subhd.tv/search",
    // 设置 SubHD 获取字幕下载链接的 API, 注意不包含域名
    "subhd_api_subtitle_download": "/ajax/down_ajax",
    // 设置 SubHD 获取字幕预览的 API, 注意不包含域名
    "subhd_api_subtitle_preview": "/ajax/file_ajax"
  }
}

Windows 右键菜单

使用命令行下载字幕还是有一点不方便,特别是需要输入路径。

在 Windows 中,可以通过注册表将 subfinder 添加到右键菜单,使用时右键选中视频文件或者文件夹,然后点击右键菜单中的 “查找字幕”。

win_menu

** 如何添加注册表:**

  • 下载 注册表文件

  • 双击注册表文件 subfinder.reg 即可添加注册表到系统中。

macOS 右键菜单

在 macOS 中,通过 Automator 的 Service 实现类似于 Windows 中的右键菜单功能。

subfinder_workflow_service.macos

使用方法:

  • 下载 workflow
  • 解压 subfinder.workflow.tar.gz。
  • 将解压出的 subfinder.workflow 复制到 / Users/YourName/Library/Services。
  • 选中视频文件或目录,右键弹出菜单,选择 “服务(Services)” -> “查找字幕”。

** 注意:在 workflow 中,subfinder 的路径是 /usr/local/bin/subfinder。**

如果想要了解如何配置 workerflow,可以参考:

图形界面

打包好的可执行文件其实是一个 GUI app,不带任何参数运行的话,会打开一个图形界面。

subfinder_gui.win

** 注意 **

  • GUI app 默认同时使用 shooter 和 zimuku 两个字幕搜索器。

  • GUI app 同样支持命令行参数。

下载页面

注意事项

shooter 字幕搜索器

  • 由于射手字幕网爬虫的实时性,可能无法查找到最新发布视频的字幕。
  • 射手字幕网 API 返回的字幕可能出现 “语言不一致” 问题(指定查找英文字幕却返回中文字幕)。

zimuku 字幕搜索器

  • zimuku 网站明明有字幕可供下载,subfinder 却提示找不到字幕。可能的原因有:

    • zimuku 字幕搜索器从视频文件名中提取的关键词不够准确,导致搜索结果为空。

    • zimuku 网站修改了 HTML 代码,导致 HTML 解析失败。

  • 从 zimuku 网站上下载的字幕一般都是压缩包(zip, rar)。Python 自带的 zipfile 标准库可以解压 zip 压缩包,不过解压 rar 压缩包需要操作系统安装有 unrar 工具。由于 windows 系统安装和配置 unrar 比较麻烦,subfinder 已经內建 unrar.exe 了。对于 Linux 和 macOS 系统的用户,需要自己手动使用系统包管理工具安装 unrar。

贡献

在使用过程中遇到任何问题,请提交 issue。

如果你希望分享你自己的字幕搜索器,欢迎提交 PR。

参考

License

MIT License

更新历史

v2.2.1

v2.2.0

  • 移除 zimuzu.

v2.1.0

  • SubFinder 默认会向字幕文件名中添加数字编号, 方便对字幕进行排序.

    大多数播放器一般会对视频对应的字幕文件进行排序, 然后默认选择第一个字幕文件.

    你可以通过 --no-order-marker 选项禁止该功能.

  • 完善了一些代码.

v2.0.2

  • 更新 gevent 和 bs4 的版本.

v2.0.1

  • 修复打包错误.

v2.0.0

  • 优化部分代码

  • 不再支持 Python2.

v1.1.4

  • hotfix

v1.1.3

  • 将参数 --repeat 修改为 --ignore.

  • 添加新参数 -k, --keyword.

  • 支持 SubHD. SubHD 在下载字幕时经常弹出验证码, 无法通过正常的API获取到字幕的下载链接, 目前的做法是通过 SubHD 的字幕预览功能获取字幕.

  • 修复一些 bug.

  • 注意: 配置文件中的一些配置项修改了名字, 具体查看文档.

v1.1.2

  • 修复 zimuzu 无法正常解析网页的问题 (因为 zimuzu 的网页结构发生了改变).

v1.1.1

  • 修复 subsearcher 的一个 bug.

v1.1.0

  • 使用 poetry 包管理器.

  • 修复若干 bug.

v1.0.9

issue 27

  • 支持用户配置文件

  • 支持用户自定义字幕组和字幕库的 API URL。

  • 支持用户自定义视频文件的后缀。

  • 支持忽略文件或文件夹。

v1.0.8

  • 修复 zimuku 搜索器的 bug。

v1.0.7

  • 升级 requests 至 2.20.0,修复 requests 安全问题

v1.0.6

  • 优化了 subsearcher。

  • 添加 --debug 选项,方便显示调试信息。

v1.0.5

  • 修复命令行参数 -l-e 的问题。

v1.0.4

  • 新增 zimuzu 字幕搜索器。

  • 优化代码。

v1.0.3

  • 优化 zimuku 字幕搜索器。

  • 內建 unrar.exe,windows 用户不用安装 unrara 了。

v1.0.2

  • GUI app 同时使用 shooter 和 zimuku 两个字幕搜索器搜索字幕。

  • GUI app 支持命令行运行。

  • 完善打包 GUI app 的流程。

v1.0.1

  • 完善 ZimukuSubsearcher。

    • 解压字幕压缩包文件时,只解压字幕文件。字幕组上传的字幕压缩包文件中可能包含其它非字幕文件。

    • 完善搜索功能。

  • 完善打包方式。

  • 修复一些 bug。

subfinder's People

Contributors

ausaki avatar dependabot[bot] avatar reekystive avatar timmyz avatar ttimasdf avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

subfinder's Issues

upgrade 1.0.9 不成功

root@OMV:~# pip install --upgrade subfinder
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Requirement already up-to-date: subfinder in /usr/local/lib/python2.7/dist-packages (1.0.8)
Requirement already satisfied, skipping upgrade: requests in /usr/local/lib/python2.7/dist-packages (from subfinder) (2.22.0)
Requirement already satisfied, skipping upgrade: six in /usr/local/lib/python2.7/dist-packages (from subfinder) (1.12.0)
Requirement already satisfied, skipping upgrade: rarfile in /usr/local/lib/python2.7/dist-packages (from subfinder) (3.0)
Requirement already satisfied, skipping upgrade: gevent in /usr/local/lib/python2.7/dist-packages (from subfinder) (1.4.0)
Requirement already satisfied, skipping upgrade: bs4 in /usr/local/lib/python2.7/dist-packages (from subfinder) (0.0.1)
Requirement already satisfied, skipping upgrade: lxml in /usr/local/lib/python2.7/dist-packages (from subfinder) (4.3.4)
Requirement already satisfied, skipping upgrade: idna<2.9,>=2.5 in /usr/local/lib/python2.7/dist-packages (from requests->subfinder) (2.8)
Requirement already satisfied, skipping upgrade: chardet<3.1.0,>=3.0.2 in /usr/local/lib/python2.7/dist-packages (from requests->subfinder) (3.0.4)
Requirement already satisfied, skipping upgrade: certifi>=2017.4.17 in /usr/local/lib/python2.7/dist-packages (from requests->subfinder) (2019.6.16)
Requirement already satisfied, skipping upgrade: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /usr/local/lib/python2.7/dist-packages (from requests->subfinder) (1.25.3)
Requirement already satisfied, skipping upgrade: greenlet>=0.4.14; platform_python_implementation == "CPython" in /usr/local/lib/python2.7/dist-packages (from gevent->subfinder) (0.4.15)
Requirement already satisfied, skipping upgrade: beautifulsoup4 in /usr/local/lib/python2.7/dist-packages (from bs4->subfinder) (4.7.1)
Requirement already satisfied, skipping upgrade: soupsieve>=1.2 in /usr/local/lib/python2.7/dist-packages (from beautifulsoup4->bs4->subfinder) (1.9.2)
Requirement already satisfied, skipping upgrade: backports.functools-lru-cache; python_version < "3" in /usr/local/lib/python2.7/dist-packages (from soupsieve>=1.2->beautifulsoup4->bs4->subfinder) (1.5)

Macos上右键subfinder提示错误

错误如下:

操作“运行 Shell 脚本”遇到了错误:“usage: subfinder [-h] [-l LANGUAGES [LANGUAGES ...]] [-e EXTS [EXTS ...]]
[-m METHOD [METHOD ...]] [-c CONF]
[--video_exts VIDEO_EXTS [VIDEO_EXTS ...]] [--repeat]
[-x EXCLUDE [EXCLUDE ...]] [--api_urls API_URLS] [-s] [-p]
[-v] [--debug]
path
subfinder: error: unrecognized arguments: Movies/Mile.22.2018.1080p.AC3/Mile.22.2018.1080p.AC3.mkv”

执行错误如下 请帮忙看看 谢谢

群晖环境
运行 python3 -m subfinder.run_gevent /volume2/movie/movie -m zimuku --debug

部分错误如下
[11/21 14:53:21]-[INFO]: Kill Mobile 2018.mp4:开始使用 搜索字幕
[11/21 14:53:22]-[ERROR]: Kill Mobile 2018.mp4:搜索字幕发生错误: not enough values to unpack (expected 2, got 0)
[11/21 14:53:22]-[INFO]: Kill Mobile 2018.mp4:找到 0 个字幕, 准备下载
[11/21 14:53:22]-[ERROR]: 缝纫机乐队 City.of.Rock.2017.WEB-DL.1080p.H264.AAC-JBY@ViPHD .mp4:搜索字幕发生错误: not enough values to unpack (expected 2, got 0)
[11/21 14:53:22]-[INFO]: 缝纫机乐队 City.of.Rock.2017.WEB-DL.1080p.H264.AAC-JBY@ViPHD .mp4:找到 0 个字幕, 准备下载

debug
[11/21 14:55:35]-[ERROR]: Kill Mobile 2018.mp4:搜索字幕发生错误: Traceback (most recent call last):
File "/volume1/@appstore/py3k/usr/local/lib/python3.5/site-packages/subfinder/subfinder.py", line 172, in _download
videofile, self.languages, self.exts)
File "/volume1/@appstore/py3k/usr/local/lib/python3.5/site-packages/subfinder/subsearcher/subsearcher.py", line 357, in search_subs
return self._search_subs(videofile, languages, exts)
File "/volume1/@appstore/py3k/usr/local/lib/python3.5/site-packages/subfinder/subsearcher/zimuku.py", line 226, in _search_subs
subinfo_list, referer = self._get_subinfo_list(keyword)
ValueError: not enough values to unpack (expected 2, got 0)

[11/21 14:55:35]-[INFO]: Kill Mobile 2018.mp4:找到 0 个字幕, 准备下载
[11/21 14:55:35]-[ERROR]: 缝纫机乐队 City.of.Rock.2017.WEB-DL.1080p.H264.AAC-JBY@ViPHD .mp4:搜索字幕发生错误: Traceback (most recent call last):
File "/volume1/@appstore/py3k/usr/local/lib/python3.5/site-packages/subfinder/subfinder.py", line 172, in _download
videofile, self.languages, self.exts)
File "/volume1/@appstore/py3k/usr/local/lib/python3.5/site-packages/subfinder/subsearcher/subsearcher.py", line 357, in search_subs
return self._search_subs(videofile, languages, exts)
File "/volume1/@appstore/py3k/usr/local/lib/python3.5/site-packages/subfinder/subsearcher/zimuku.py", line 226, in _search_subs
subinfo_list, referer = self._get_subinfo_list(keyword)
ValueError: not enough values to unpack (expected 2, got 0)

[11/21 14:55:35]-[INFO]: 缝纫机乐队 City.of.Rock.2017.WEB-DL.1080p.H264.AAC-JBY@ViPHD .mp4:找到 0 个字幕, 准备下载

not enough values to unpack (expected 2, got 0)

[08/17 23:33:28]-[INFO]: 开始
[08/17 23:33:29]-[INFO]: Shania.Twain.Still.The.One.Live.From.Vegas.2012.720p.BluRay.x264.DTS-WiKi.mkv:开始使用 搜索字幕
[08/17 23:33:29]-[INFO]: Mindhunter.S02E03.1080p.NF.WEB-DL.DDP5.1.x264-MZABI.mkv:开始使用 搜索字幕
[08/17 23:33:29]-[INFO]: Mindhunter.S02E04.1080p.NF.WEB-DL.DDP5.1.x264-MZABI.mkv:开始使用 搜索字幕
[08/17 23:33:29]-[INFO]: Mindhunter.S02E05.1080p.NF.WEB-DL.DDP5.1.x264-MZABI.mkv:开始使用 搜索字幕
[08/17 23:33:29]-[INFO]: Mindhunter.S02E06.1080p.NF.WEB-DL.DDP5.1.x264-MZABI.mkv:开始使用 搜索字幕
[08/17 23:33:29]-[INFO]: Mindhunter.S02E07.1080p.NF.WEB-DL.DDP5.1.x264-MZABI.mkv:开始使用 搜索字幕
[08/17 23:33:29]-[INFO]: Mindhunter.S02E08.1080p.NF.WEB-DL.DDP5.1.x264-MZABI.mkv:开始使用 搜索字幕
[08/17 23:33:29]-[INFO]: Mindhunter.S02E01.1080p.NF.WEB-DL.DDP5.1.x264-MZABI.mkv:开始使用 搜索字幕
[08/17 23:33:29]-[INFO]: Men.in.Black.4.2019.WEB-DL.2160p.H265.EAC3.3Audio-JFW.mkv:开始使用 搜索字幕
[08/17 23:33:29]-[ERROR]: Shania.Twain.Still.The.One.Live.From.Vegas.2012.720p.BluRay.x264.DTS-WiKi.mkv:搜索字幕发生错误: not enough values to unpack (expected 2, got 0)
[08/17 23:33:29]-[INFO]: Shania.Twain.Still.The.One.Live.From.Vegas.2012.720p.BluRay.x264.DTS-WiKi.mkv:找到 0 个字幕, 准备下载
[08/17 23:33:29]-[ERROR]: Men.in.Black.4.2019.WEB-DL.2160p.H265.EAC3.3Audio-JFW.mkv:搜索字幕发生错误: not enough values to unpack (expected 2, got 0)
[08/17 23:33:29]-[INFO]: Men.in.Black.4.2019.WEB-DL.2160p.H265.EAC3.3Audio-JFW.mkv:找到 0 个字幕, 准备下载
[08/17 23:33:34]-[INFO]: Mindhunter.S02E07.1080p.NF.WEB-DL.DDP5.1.x264-MZABI.mkv:找到 1 个字幕, 准备下载
[08/17 23:33:36]-[INFO]: Mindhunter.S02E08.1080p.NF.WEB-DL.DDP5.1.x264-MZABI.mkv:找到 1 个字幕, 准备下载
[08/17 23:33:36]-[INFO]: Mindhunter.S02E04.1080p.NF.WEB-DL.DDP5.1.x264-MZABI.mkv:找到 1 个字幕, 准备下载
[08/17 23:33:36]-[INFO]: Mindhunter.S02E05.1080p.NF.WEB-DL.DDP5.1.x264-MZABI.mkv:找到 1 个字幕, 准备下载
[08/17 23:33:36]-[INFO]: Mindhunter.S02E06.1080p.NF.WEB-DL.DDP5.1.x264-MZABI.mkv:找到 1 个字幕, 准备下载
[08/17 23:33:38]-[INFO]: Mindhunter.S02E03.1080p.NF.WEB-DL.DDP5.1.x264-MZABI.mkv:找到 1 个字幕, 准备下载
[08/17 23:33:42]-[INFO]: Mindhunter.S02E01.1080p.NF.WEB-DL.DDP5.1.x264-MZABI.mkv:找到 1 个字幕, 准备下载
[08/17 23:33:42]-[INFO]: ====================下载完成====================
[08/17 23:33:42]-[INFO]: Mindhunter.S02E01.1080p.NF.WEB-DL.DDP5.1.x264-MZABI.mkv: 下载 4 个字幕
[08/17 23:33:42]-[INFO]: Men.in.Black.4.2019.WEB-DL.2160p.H265.EAC3.3Audio-JFW.mkv: 下载 0 个字幕
[08/17 23:33:42]-[INFO]: Mindhunter.S02E06.1080p.NF.WEB-DL.DDP5.1.x264-MZABI.mkv: 下载 9 个字幕
[08/17 23:33:42]-[INFO]: Mindhunter.S02E08.1080p.NF.WEB-DL.DDP5.1.x264-MZABI.mkv: 下载 9 个字幕
[08/17 23:33:42]-[INFO]: Mindhunter.S02E03.1080p.NF.WEB-DL.DDP5.1.x264-MZABI.mkv: 下载 9 个字幕
[08/17 23:33:42]-[INFO]: Mindhunter.S02E04.1080p.NF.WEB-DL.DDP5.1.x264-MZABI.mkv: 下载 9 个字幕
[08/17 23:33:42]-[INFO]: Mindhunter.S02E07.1080p.NF.WEB-DL.DDP5.1.x264-MZABI.mkv: 下载 9 个字幕
[08/17 23:33:42]-[INFO]: Mindhunter.S02E05.1080p.NF.WEB-DL.DDP5.1.x264-MZABI.mkv: 下载 9 个字幕
[08/17 23:33:42]-[INFO]: Shania.Twain.Still.The.One.Live.From.Vegas.2012.720p.BluRay.x264.DTS-WiKi.mkv: 下载 0 个字幕

这个 “发生错误: not enough values to unpack (expected 2, got 0)” 估计是代码错误 能否修改一下/最后感谢作者这个字幕下载器 很有用

有时候,文件名全匹配搜索不到字幕

有时候,文件名全匹配搜索不到字幕

当全匹配搜索不到时,建议:
方案1.建立规则列表、用include或exclude对文件名预处理再搜索
方案2.用imdb、豆瓣电影等网站搜索引擎,先匹配电影名,再在字幕网站搜索字幕

1.0.4没有exe文件

不知道是不是忘了上传exe封装文件了,试了1.0.3,挺好用的,希望也能更新到1.0.4

群晖下如何定期执行脚本

群晖也是linux系统。
老哥这插件很好,但每次都得手动输一遍subfinder /volume4/4/video
想实现定期匹配字幕效果
[捂脸]看不懂应该在crontab加一行指令?还是把指令存为.py在定期执行?
谢谢

你好,请问在openwrt下运行出错

Traceback (most recent call last):
File "/tmp/SubFinder.py", line 5, in
import requests
ImportError: No module named requests

请问怎么解决?
python 2.7.12-1

python3 3.5.2-1
都安装了还是这样,求解,谢谢

群晖任务计划中运行报编码集错误。

Dear user, 

Task Scheduler has completed a scheduled task. 

Task: autodownloadsrt 
Start time: Thu, 25 Jul 2019 11:26:36 GMT 
Stop time: Thu, 25 Jul 2019 11:26:37 GMT 
Current status: 1 
Standard output/error: 
[07/25 11:26:37]-[INFO]: 开始 
Traceback (most recent call last): 
  File "/bin/subfinder", line 10, in  
    sys.exit(run()) 
  File "/usr/lib/python2.7/site-packages/subfinder/run_gevent.py", line 10, in run 
    run_(SubFinder) 
  File "/usr/lib/python2.7/site-packages/subfinder/run.py", line 86, in run 
    subfinder.start() 
  File "/usr/lib/python2.7/site-packages/subfinder/subfinder.py", line 159, in start 
    videofiles = self._filter_path(self.path) 
  File "/usr/lib/python2.7/site-packages/subfinder/subfinder.py", line 74, in _filter_path 
    for root, dirs, files in os.walk(path): 
  File "/usr/lib/python2.7/os.py", line 286, in walk 
    if isdir(join(top, name)): 
  File "/usr/lib/python2.7/posixpath.py", line 73, in join 
    path += '/' + b 
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe5 in position 1: ordinal not in range(128) 

mac 上能运行吗

我的电脑是mac ,文件是有数据的
没有request
跑下面这个命令报这个错

➜ python-shooter.org git:(master) ✗ python SubFinder.py /Users/wushao/Library/Containers/com.youku.mac/Data/test.mp4
Find 1 video

Exception in thread Thread-1:
Traceback (most recent call last):
File "/Users/wushao/anaconda/lib/python3.5/threading.py", line 914, in _bootstrap_inner
self.run()
File "SubFinder.py", line 189, in run
sub_info_list = getSubInfo(f, lang)
File "SubFinder.py", line 100, in getSubInfo
filehash = computerVideoHash(videofile)
File "SubFinder.py", line 61, in computerVideoHash
total_size = getFileSize(fp)
File "SubFinder.py", line 51, in getFileSize
if isinstance(filestring_or_fileobj, basestring):
NameError: name 'basestring' is not defined


Finish.find 0 subtitles,0 sucessed,0 failed,0 files not found subtitle

添加用户配置文件功能

  • 支持用户自定义字幕组和字幕库的API URL。

  • 支持用户自定义视频文件的后缀。

  • 支持忽略文件或文件夹。

相关issue:

freebsd里出错

如能获得你的帮助,感激不尽
`nas4free: transmission# ./subfinder.py /mnt/zfsrz2/share/downloads/movie/Blade.Runner.Final.Cut.1997.720p.BluRay.x264-WiKi/Blade.Runner.Final.Cut.1997.720p.BluRay.x264-WiKi.mkv
Find 1 video

Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/local/lib/python3.6/threading.py", line 916, in _bootstrap_inner
self.run()
File "./subfinder.py", line 212, in run
sub_info_list = getSubInfo(f, lang)
File "./subfinder.py", line 123, in getSubInfo
filehash = computerVideoHash(videofile)
File "./subfinder.py", line 89, in computerVideoHash
total_size = getFileSize(fp)
File "./subfinder.py", line 78, in getFileSize
if isinstance(filestring_or_fileobj, file):
NameError: name 'file' is not defined


Finish.find 0 subtitles,0 sucessed,0 failed,0 files not found subtitle`

subfinder:未找到命令

小白一个,ubuntu18.04的系统按照提示安装pip install subfinder以后输入subfinder提示未找到命令,请问是还缺少什么吗?

nas中无法配置定时任务

image
contab配置如图所示,但无法执行,经测试contab本身运行无问题,想请教下是命令行书写有误吗?新手小白,求作者指点

字幕库、字幕组双语zh_en字幕下载解析报错、无法成功下载

感谢大神提供这个工具,一直想对自己堆积成山的视频字幕做一个自动化、定制化的字幕下载,但苦于没有寻找到合适的工具,楼主的工具绝大部分实现要求,但是有几个小问题请大神看看来有问题:

1.射手网的字幕不管UI界面还是命令行都能正常下载,只是由于还存在顺便学口语的想法一般下字幕都是下“中英文”双语版,但是射手网没有。

2.尝试字幕库或者字幕组的的双语zh_en指定搜索,通过网页API地址搜索都能出来正确双语字幕
http://www.zimuku.la/search?q=Captain.Marvel.2019
http://www.zmz2019.com/search?keyword=Captain.Marvel.2019&type=subtitle
但通过subfinder 出现以下问题:
A.字幕库直接报错“ Max retries exceeded with url: /search?q=Captain.Marvel.2019 (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'tls_process_server_certificate', 'certificate
verify failed')],)",),))”
B.字幕组没报错但是无搜索结果

麻烦大神看看是不是这两个站的解析出问题了,十分感谢,GIThub已加星^_^

subfinder Z:\Captain.Marvel.2019.1080p.BluRay.x264.DTS-WiKi -l zh_en -m zimuku zimuzu -debug
[10/04 23:04:16]-[INFO]: 开始
[10/04 23:04:16]-[INFO]: 找到 1 个视频文件
[10/04 23:04:16]-[INFO]: Captain.Marvel.2019.1080p.BluRay.x264.DTS-WiKi.mkv:开
始使用 搜索字幕
[10/04 23:04:16]-[DEBUG]: keyword: Captain.Marvel.2019
[10/04 23:04:16]-[DEBUG]: videoinfo: {u'source': u'BluRay', u'episode': 0, u'vid
eo_encoding': u'x264', u'title': u'Captain.Marvel.2019', u'season': 0, u'audio_e
ncoding': u'', u'sub_title': u'', u'resolution': u'1080p'}
[10/04 23:04:16]-[ERROR]: Captain.Marvel.2019.1080p.BluRay.x264.DTS-WiKi.mkv:搜
索字幕发生错误: Traceback (most recent call last):
File "subfinder\subfinder.py", line 119, in _download
File "subfinder\subsearcher\subsearcher.py", line 355, in search_subs
File "subfinder\subsearcher\zimuku.py", line 225, in _search_subs
File "subfinder\subsearcher\zimuku.py", line 160, in _get_subinfo_list
File "site-packages\requests\sessions.py", line 521, in get
File "site-packages\requests\sessions.py", line 508, in request
File "site-packages\requests\sessions.py", line 618, in send
File "site-packages\requests\adapters.py", line 506, in send
SSLError: HTTPSConnectionPool(host='www.zimuku.la', port=443): Max retries excee
ded with url: /search?q=Captain.Marvel.2019 (Caused by SSLError(SSLError("bad ha
ndshake: Error([('SSL routines', 'tls_process_server_certificate', 'certificate
verify failed')],)",),))

[10/04 23:04:16]-[INFO]: Captain.Marvel.2019.1080p.BluRay.x264.DTS-WiKi.mkv:开
始使用 搜索字幕
[10/04 23:04:16]-[DEBUG]: videoinfo: {u'source': u'BluRay', u'episode': 0, u'vid
eo_encoding': u'x264', u'title': u'Captain.Marvel.2019', u'season': 0, u'audio_e
ncoding': u'', u'sub_title': u'', u'resolution': u'1080p'}
[10/04 23:04:16]-[DEBUG]: subinfo_list: []
[10/04 23:04:16]-[DEBUG]: subinfo_list: []
[10/04 23:04:16]-[DEBUG]: subinfo: None
[10/04 23:04:16]-[INFO]: Captain.Marvel.2019.1080p.BluRay.x264.DTS-WiKi.mkv:找
到 0 个字幕, 准备下载
[10/04 23:04:16]-[INFO]: ====================下载完成====================
[10/04 23:04:16]-[INFO]: Captain.Marvel.2019.1080p.BluRay.x264.DTS-WiKi.mkv: 下
载 0 个字幕

搜索字幕发生错误: Traceback (most recent call last)

$ subfinder ./ -m zimuku --debug
[04/08 12:11:01]-[INFO]: 开始
[04/08 12:11:01]-[INFO]: Ballon.2018.Bluray.REMUX.GER.2160p.HEVC.TrueHD.7.1.Atmos-MOLAMOLA.mkv:开始使用 <zimuku> 搜索字幕
[04/08 12:11:01]-[DEBUG]: keyword: Ballon.2018
[04/08 12:11:01]-[DEBUG]: videoinfo: {'title': 'Ballon.2018', 'season': 0, 'video_encoding': '', 'episode': 0, 'audio_encoding': '', 'resolution': '2160p',
 'source': 'Bluray'}
[04/08 12:11:02]-[INFO]: Parasite.2019.KOREAN.2160p.BluRay.REMUX.HEVC.DTS-HD.MA.TrueHD.7.1.Atmos-FGT.mkv:开始使用 <zimuku> 搜索字幕
[04/08 12:11:02]-[DEBUG]: keyword: Parasite.2019.KOREAN
[04/08 12:11:02]-[DEBUG]: videoinfo: {'title': 'Parasite.2019.KOREAN', 'season': 0, 'video_encoding': '', 'episode': 0, 'audio_encoding': '', 'resolution':
 '2160p', 'source': 'BluRay'}
[04/08 12:11:02]-[INFO]: La.camarista.2018.REPACK.1080p.AMZN.WEB-DL.DDP5.1.H.264-NTG.mkv:开始使用 <zimuku> 搜索字幕
[04/08 12:11:02]-[DEBUG]: keyword: La.camarista.2018.REPACK
[04/08 12:11:02]-[DEBUG]: videoinfo: {'title': 'La.camarista.2018.REPACK', 'season': 0, 'video_encoding': 'H.264', 'episode': 0, 'audio_encoding': 'DDP5.1'
, 'resolution': '1080p', 'source': 'WEB-DL'}
[04/08 12:11:02]-[INFO]: They.Shall.Not.Grow.Old.2018.2160p.WEB-DL.H265.AAC-LeagueTV.mp4:开始使用 <zimuku> 搜索字幕
[04/08 12:11:02]-[DEBUG]: keyword: They.Shall.Not.Grow.Old.2018
[04/08 12:11:02]-[DEBUG]: videoinfo: {'title': 'They.Shall.Not.Grow.Old.2018', 'season': 0, 'video_encoding': '', 'episode': 0, 'audio_encoding': '', 'reso
lution': '2160p', 'source': 'WEB-DL'}
[04/08 12:11:02]-[DEBUG]: subinfo_list: []
[04/08 12:11:02]-[DEBUG]: subinfo: None
[04/08 12:11:02]-[INFO]: La.camarista.2018.REPACK.1080p.AMZN.WEB-DL.DDP5.1.H.264-NTG.mkv:找到 0 个字幕, 准备下载
[04/08 12:11:02]-[DEBUG]: subinfo_list: [{'download_count': 3013, 'title': '奇蹟熱氣球 Ballon.2018.GERMAN.1080p.BluRay.x264-HANDJOB', 'author': '', 'langua
ges': ['zh_chs', 'zh_cht', 'en'], 'link': 'http://www.zimuku.la/detail/125771.html', 'rate': '10', 'exts': ['srt']}, {'download_count': 3817, 'title': '气
球(简繁字幕)Ballon.2018.720p.BluRay.x264-WiKi.zip', 'author': '', 'languages': ['zh_chs', 'zh_cht'], 'link': 'http://www.zimuku.la/detail/116918.html', 'ra
te': '10', 'exts': ['srt']}, {'download_count': 6054, 'title': '气球.Ballon.2018.GERMAN.1080p.BluRay.x264.DTS-LeetHD-官方R3.zip', 'author': '', 'languages'
: ['zh_chs', 'zh_cht'], 'link': 'http://www.zimuku.la/detail/116445.html', 'rate': '10', 'exts': ['idx+sub', 'srt']}, {'download_count': 633, 'title': '气
球 Ballon (2018) 奇蹟熱氣球', 'author': '', 'languages': ['zh_cht'], 'link': 'http://www.zimuku.la/detail/116390.html', 'rate': '10', 'exts': ['idx+sub']}]
[04/08 12:11:02]-[ERROR]: Ballon.2018.Bluray.REMUX.GER.2160p.HEVC.TrueHD.7.1.Atmos-MOLAMOLA.mkv:搜索字幕发生错误: Traceback (most recent call last):
  File "/home/fyh/.local/lib/python3.5/site-packages/subfinder/subfinder.py", line 173, in _download
    videofile, self.languages, self.exts)
  File "/home/fyh/.local/lib/python3.5/site-packages/subfinder/subsearcher/subsearcher.py", line 348, in search_subs
    return self._search_subs(videofile, languages, exts)
  File "/home/fyh/.local/lib/python3.5/site-packages/subfinder/subsearcher/zimuku.py", line 235, in _search_subs
    subinfo_list, videoinfo, languages, exts)
  File "/home/fyh/.local/lib/python3.5/site-packages/subfinder/subsearcher/subsearcher.py", line 233, in _filter_subinfo_list
    if videoinfo.get(field).lower() == videoinfo_.get(field).lower():
AttributeError: 'int' object has no attribute 'lower'

[04/08 12:11:02]-[INFO]: Ballon.2018.Bluray.REMUX.GER.2160p.HEVC.TrueHD.7.1.Atmos-MOLAMOLA.mkv:找到 0 个字幕, 准备下载
[04/08 12:11:02]-[DEBUG]: subinfo_list: [{'download_count': 275, 'title': '他们已不再变老【Orange字幕组 中英双语字幕】They.Shall.Not.Grow.Old.2018.1080p.Bl
uRay.H264.AAC-RARBG.zip', 'author': 'Orange字幕组', 'languages': ['zh_chs', 'en', 'zh_en'], 'link': 'http://www.zimuku.la/detail/131811.html', 'rate': '0',
 'exts': ['srt', 'ass', 'ssa']}, {'download_count': 6899, 'title': 'They.Shall.Not.Grow.Old.2018.LiMiTED.1080p.BluRay.x264-CADAVER.chs.srt', 'author': '',
'languages': ['zh_chs'], 'link': 'http://www.zimuku.la/detail/114891.html', 'rate': '7', 'exts': ['srt']}, {'download_count': 9650, 'title': '他们已不再变
老 They.Shall.Not.Grow.Old 2018 1080p.BluRay.AVC.DTS.HD.MA.5.1-HDBEE.zip', 'author': '', 'languages': ['zh_chs', 'en', 'zh_en'], 'link': 'http://www.zimuku
.la/detail/113888.html', 'rate': '10', 'exts': ['srt', 'ass', 'ssa']}, {'download_count': 4061, 'title': '他们永不变老they.shall.not.grow.old.2018.limited.
1080p.bluray.x264-cadaver-chs.srt', 'author': '', 'languages': ['zh_chs'], 'link': 'http://www.zimuku.la/detail/112628.html', 'rate': '5', 'exts': ['srt']}
, {'download_count': 1400, 'title': '他們永不變老they.shall.not.grow.old.2018.limited.1080p.bluray.x264-cadaver.srt', 'author': '', 'languages': ['zh_cht']
, 'link': 'http://www.zimuku.la/detail/112627.html', 'rate': '5', 'exts': ['srt']}, {'download_count': 6107, 'title': '【中字】他们已不再变老 They.Shall.No
t.Grow.Old.2018.Limited.1080p.BluRay.x264-CADAVER.zip', 'author': '', 'languages': ['zh_chs'], 'link': 'http://www.zimuku.la/detail/112425.html', 'rate': '
5', 'exts': ['srt']}, {'download_count': 4079, 'title': '[彼得·杰克逊一战纪录片] 他们已不再变老 They.Shall.Not.Grow.Old.1080p.x264.AAC.MVGroup.Forum.rar',
'author': '', 'languages': ['zh_chs', 'en', 'zh_en'], 'link': 'http://www.zimuku.la/detail/112324.html', 'rate': '6', 'exts': ['srt']}]
[04/08 12:11:02]-[ERROR]: They.Shall.Not.Grow.Old.2018.2160p.WEB-DL.H265.AAC-LeagueTV.mp4:搜索字幕发生错误: Traceback (most recent call last):
  File "/home/fyh/.local/lib/python3.5/site-packages/subfinder/subfinder.py", line 173, in _download
    videofile, self.languages, self.exts)
  File "/home/fyh/.local/lib/python3.5/site-packages/subfinder/subsearcher/subsearcher.py", line 348, in search_subs
    return self._search_subs(videofile, languages, exts)
  File "/home/fyh/.local/lib/python3.5/site-packages/subfinder/subsearcher/zimuku.py", line 235, in _search_subs
    subinfo_list, videoinfo, languages, exts)
  File "/home/fyh/.local/lib/python3.5/site-packages/subfinder/subsearcher/subsearcher.py", line 233, in _filter_subinfo_list
    if videoinfo.get(field).lower() == videoinfo_.get(field).lower():
AttributeError: 'int' object has no attribute 'lower'

[04/08 12:11:02]-[INFO]: They.Shall.Not.Grow.Old.2018.2160p.WEB-DL.H265.AAC-LeagueTV.mp4:找到 0 个字幕, 准备下载
[04/08 12:11:03]-[DEBUG]: subinfo_list: [{'download_count': 8433, 'title': '2019 寄生虫 4K 中文 特效 合成花絮插曲配乐', 'author': '', 'languages': ['zh_chs
'], 'link': 'http://www.zimuku.la/detail/130892.html', 'rate': '8', 'exts': ['sup']}, {'download_count': 3516, 'title': '寄生虫 Parasite 기생충 (2019) 英文
字幕', 'author': '', 'languages': ['en'], 'link': 'http://www.zimuku.la/detail/129671.html', 'rate': '10', 'exts': ['srt']}, {'download_count': 38000, 'tit
le': '寄生虫(简繁字幕)Parasite.2019.720p.BluRay.x264.DTS-WiKi.zip', 'author': '', 'languages': ['zh_chs', 'zh_cht'], 'link': 'http://www.zimuku.la/detail/1
28230.html', 'rate': '9', 'exts': ['srt']}, {'download_count': 65000, 'title': '【蓝光版】寄生虫.Parasite .2019.KOREAN.720p.BluRay.x264.DTS-FGT.srt', 'auth
or': '', 'languages': ['zh_chs'], 'link': 'http://www.zimuku.la/detail/128188.html', 'rate': '9', 'exts': ['srt']}, {'download_count': 55000, 'title': '寄
生虫 Parasite 기생충     (2019) 校准时间轴.ass', 'author': '', 'languages': ['zh_chs'], 'link': 'http://www.zimuku.la/detail/127126.html', 'rate': '10', 'e
xts': ['ass', 'ssa']}, {'download_count': 17000, 'title': '寄生上流 기생충 Parasite.2019.KOREAN.720p.BluRay.x264.DTS-FGT', 'author': '', 'languages': ['zh_
cht', 'en'], 'link': 'http://www.zimuku.la/detail/126685.html', 'rate': '10', 'exts': ['srt']}, {'download_count': 12000, 'title': 'Parasite.2019.KOREAN.10
80p.BluRay.x264.DTS-HD.MA.7.1-FGT.ass', 'author': '', 'languages': ['zh_chs'], 'link': 'http://www.zimuku.la/detail/126874.html', 'rate': '10', 'exts': ['a
ss', 'ssa']}, {'download_count': 17000, 'title': '寄生虫 Parasite.2019.KOREAN.1080p.BluRay.x264.DTS-FGT.rar', 'author': '', 'languages': ['zh_chs', 'zh_cht
'], 'link': 'http://www.zimuku.la/detail/126686.html', 'rate': '10', 'exts': ['ass', 'ssa']}, {'download_count': 50000, 'title': '寄生虫.Parasite.2019.KORE
AN.1080p.BluRay.x264.TrueHD.7.1.Atmos-FGT.zip', 'author': 'F.I.X字幕侠', 'languages': ['zh_chs'], 'link': 'http://www.zimuku.la/detail/126654.html', 'rate'
: '9', 'exts': ['srt', 'ass', 'ssa']}, {'download_count': 2604, 'title': '寄生虫 PARASITE.2019.1080p.FHDRip.H264.AAC-NonDRM.srt', 'author': '', 'languages'
: ['zh_chs'], 'link': 'http://www.zimuku.la/detail/125657.html', 'rate': '0', 'exts': ['srt']}, {'download_count': 18000, 'title': '【SUP特效字幕】.PARASIT
E.2019.1080p.FHDRip.chs&eng', 'author': '', 'languages': ['zh_chs', 'en', 'zh_en'], 'link': 'http://www.zimuku.la/detail/122133.html', 'rate': '10', 'exts'
: ['sub']}, {'download_count': 41000, 'title': '【FIX字幕侠】寄生虫.PARASITE.2019.1080p.FHDRip.H264.AAC-NonDRM.rar', 'author': 'F.I.X字幕侠', 'languages':
['zh_chs'], 'link': 'http://www.zimuku.la/detail/121985.html', 'rate': '9', 'exts': ['ass', 'ssa']}, {'download_count': 24000, 'title': '寄生虫 Parasite.20
19.KOREAN.1080p.WEBRip.x264.AAC2.0-NOGRP.rar', 'author': '', 'languages': ['zh_chs', 'zh_cht'], 'link': 'http://www.zimuku.la/detail/121876.html', 'rate':
'10', 'exts': ['ass', 'ssa']}, {'download_count': 32000, 'title': '【台版公映字幕】寄生虫.PARASITE.2019.720p.HDRip.H264.AAC-NonDRM.srt', 'author': '', 'lan
guages': ['zh_chs'], 'link': 'http://www.zimuku.la/detail/121654.html', 'rate': '10', 'exts': ['srt']}, {'download_count': 10000, 'title': '【大玩具字幕组
】寄生虫.PARASITE.2019.720p.HDRip.H264.AAC-NonDRM.srt', 'author': '', 'languages': ['zh_chs'], 'link': 'http://www.zimuku.la/detail/121735.html', 'rate': '
8', 'exts': ['srt', 'ass', 'ssa']}, {'download_count': 62000, 'title': '【简体】寄生虫.PARASITE.2019.1080p.FHDRip.H264.AAC-NonDRM.rar', 'author': '', 'lang
uages': ['zh_chs'], 'link': 'http://www.zimuku.la/detail/121636.html', 'rate': '9', 'exts': ['srt', 'ass', 'ssa']}]
[04/08 12:11:03]-[ERROR]: Parasite.2019.KOREAN.2160p.BluRay.REMUX.HEVC.DTS-HD.MA.TrueHD.7.1.Atmos-FGT.mkv:搜索字幕发生错误: Traceback (most recent call l
ast):
  File "/home/fyh/.local/lib/python3.5/site-packages/subfinder/subfinder.py", line 173, in _download
    videofile, self.languages, self.exts)
  File "/home/fyh/.local/lib/python3.5/site-packages/subfinder/subsearcher/subsearcher.py", line 348, in search_subs
    return self._search_subs(videofile, languages, exts)
  File "/home/fyh/.local/lib/python3.5/site-packages/subfinder/subsearcher/zimuku.py", line 235, in _search_subs
    subinfo_list, videoinfo, languages, exts)
  File "/home/fyh/.local/lib/python3.5/site-packages/subfinder/subsearcher/subsearcher.py", line 233, in _filter_subinfo_list
    if videoinfo.get(field).lower() == videoinfo_.get(field).lower():
AttributeError: 'int' object has no attribute 'lower'

[04/08 12:11:03]-[INFO]: Parasite.2019.KOREAN.2160p.BluRay.REMUX.HEVC.DTS-HD.MA.TrueHD.7.1.Atmos-FGT.mkv:找到 0 个字幕, 准备下载
[04/08 12:11:03]-[INFO]: ====================下载完成====================
[04/08 12:11:03]-[INFO]: Ballon.2018.Bluray.REMUX.GER.2160p.HEVC.TrueHD.7.1.Atmos-MOLAMOLA.mkv: 下载 0 个字幕
[04/08 12:11:03]-[INFO]: They.Shall.Not.Grow.Old.2018.2160p.WEB-DL.H265.AAC-LeagueTV.mp4: 下载 0 个字幕
[04/08 12:11:03]-[INFO]: La.camarista.2018.REPACK.1080p.AMZN.WEB-DL.DDP5.1.H.264-NTG.mkv: 下载 0 个字幕
[04/08 12:11:03]-[INFO]: Parasite.2019.KOREAN.2160p.BluRay.REMUX.HEVC.DTS-HD.MA.TrueHD.7.1.Atmos-FGT.mkv: 下载 0 个字幕

奇怪的问题

subfinder.py /abc/Mayhem.2017.1080p.WEB-DL.DD5.1.H264-FGT/Mayhem.2017.1080p.WEB-DL.DD5.1.H264-FGT.mkv
报错, 其他名字的mkv没问题,不知道是不是没找到而抱着个错误
Find 1 video

Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/local/lib/python3.6/threading.py", line 916, in _bootstrap_inner
self.run()
File "./subfinder.py", line 222, in run
sub_info_list = getSubInfo(f, lang)
File "./subfinder.py", line 146, in getSubInfo
return res.json()
File "/usr/local/lib/python3.6/site-packages/requests/models.py", line 892, in json
return complexjson.loads(self.text, **kwargs)
File "/usr/local/lib/python3.6/json/init.py", line 354, in loads
return _default_decoder.decode(s)
File "/usr/local/lib/python3.6/json/decoder.py", line 339, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/local/lib/python3.6/json/decoder.py", line 357, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

zimuku 没有搜索到字幕,就会把整季字幕都下载

Season 2 目录下一共有 4 集,第 4 集搜索时 zimuku 网站上还没有字幕。此时如果用 subfinder 找第 4 集的字幕,会将所有找到的 Season 2 所有第 1 集 - 第 3 集的字幕都下载下来,然后都命名为第 4 集的文件名,也就是下载到错误的字幕。

root@DS918:/volume3/entertainment/tv/Titans (2018)/Season 2# ls
Titans.2018.S02E01.Trigon.REPACK.1080p.DCU.WEB-DL.DD5.1.H264-NTb..ass           Titans.2018.S02E02.Rose.1080p.DCU.WEB-DL.DD5.1.H264-NTb[ettv].繁体.ass
Titans.2018.S02E01.Trigon.REPACK.1080p.DCU.WEB-DL.DD5.1.H264-NTb.mkv            Titans.2018.S02E02.Rose.1080p.DCU.WEB-DL.DD5.1.H264-NTb[ettv].英文.srt
Titans.2018.S02E01.Trigon.REPACK.1080p.DCU.WEB-DL.DD5.1.H264-NTb.rar            Titans.2018.S02E02.Rose.1080p.DCU.WEB-DL.DD5.1.H264-NTb[ettv].英文&简体.srt
Titans.2018.S02E01.Trigon.REPACK.1080p.DCU.WEB-DL.DD5.1.H264-NTb.简体.ass       Titans.2018.S02E02.Rose.1080p.DCU.WEB-DL.DD5.1.H264-NTb[ettv].英文&繁体.ass
Titans.2018.S02E01.Trigon.REPACK.1080p.DCU.WEB-DL.DD5.1.H264-NTb.简体.srt       Titans.2018.S02E03.Ghosts.1080p.DCU.WEB-DL.DD5.1.H264-NTb..ass
Titans.2018.S02E01.Trigon.REPACK.1080p.DCU.WEB-DL.DD5.1.H264-NTb.繁体.ass       Titans.2018.S02E03.Ghosts.1080p.DCU.WEB-DL.DD5.1.H264-NTb.mkv
Titans.2018.S02E01.Trigon.REPACK.1080p.DCU.WEB-DL.DD5.1.H264-NTb.英文.srt       Titans.2018.S02E03.Ghosts.1080p.DCU.WEB-DL.DD5.1.H264-NTb.rar
Titans.2018.S02E01.Trigon.REPACK.1080p.DCU.WEB-DL.DD5.1.H264-NTb.英文&简体.srt  Titans.2018.S02E03.Ghosts.1080p.DCU.WEB-DL.DD5.1.H264-NTb.简体.ass
Titans.2018.S02E01.Trigon.REPACK.1080p.DCU.WEB-DL.DD5.1.H264-NTb.英文&繁体.ass  Titans.2018.S02E03.Ghosts.1080p.DCU.WEB-DL.DD5.1.H264-NTb.简体.srt
Titans.2018.S02E02.Rose.1080p.DCU.WEB-DL.DD5.1.H264-NTb[ettv]..ass              Titans.2018.S02E03.Ghosts.1080p.DCU.WEB-DL.DD5.1.H264-NTb.繁体.ass
Titans.2018.S02E02.Rose.1080p.DCU.WEB-DL.DD5.1.H264-NTb[ettv].mkv               Titans.2018.S02E03.Ghosts.1080p.DCU.WEB-DL.DD5.1.H264-NTb.英文.srt
Titans.2018.S02E02.Rose.1080p.DCU.WEB-DL.DD5.1.H264-NTb[ettv].rar               Titans.2018.S02E03.Ghosts.1080p.DCU.WEB-DL.DD5.1.H264-NTb.英文&简体.srt
Titans.2018.S02E02.Rose.1080p.DCU.WEB-DL.DD5.1.H264-NTb[ettv].简体.ass          Titans.2018.S02E03.Ghosts.1080p.DCU.WEB-DL.DD5.1.H264-NTb.英文&繁体.ass
Titans.2018.S02E02.Rose.1080p.DCU.WEB-DL.DD5.1.H264-NTb[ettv].简体.srt          Titans.2018.S02E04.Aqualad.1080p.DCU.WEB-DL.DD5.1.H264-NTb[ettv].mkv
root@DS918:/volume3/entertainment/tv/Titans (2018)/Season 2# subfinder ./Titans.2018.S02E04.Aqualad.1080p.DCU.WEB-DL.DD5.1.H264-NTb[ettv].mkv -m zimuku --debug
[09/29 15:50:51]-[INFO]: 开始
[09/29 15:50:51]-[INFO]: Titans.2018.S02E04.Aqualad.1080p.DCU.WEB-DL.DD5.1.H264-NTb[ettv].mkv:开始使用 <zimuku> 搜索字幕
[09/29 15:50:51]-[DEBUG]: keyword: Titans.2018.S02
[09/29 15:50:51]-[DEBUG]: videoinfo: {'season': 2, 'video_encoding': '', 'audio_encoding': 'DD5.1', 'episode': 4, 'resolution': '1080p', 'title': 'Titans.2018', 'sub_title': 'Aqualad', 'source': 'WEB-DL'}
[09/29 15:50:52]-[DEBUG]: subinfo_list: [{'link': 'http://www.zimuku.la/detail/123540.html', 'rate': '0', 'author': '擦枪字幕组', 'title': '泰坦 第二季(第3集-简繁英双语字幕-擦枪字幕组)Titans.2018.S02E03.Ghosts.1080p.DCU.WEB-DL.DD5.1.H264-NTb.chs.eng.rar', 'download_count': 159, 'languages': ['zh_chs', 'zh_cht', 'en', 'zh_en'], 'exts': ['srt', 'ass', 'ssa']}, {'link': 'http://www.zimuku.la/detail/123508.html', 'rate': '0', 'author': 'YYeTs字幕组', 'title': '泰坦 第2季第03集【YYeTs字幕组 简繁英双语字幕】Titans.2018.S02E03.Ghosts.720p/1080p.DCU.WEB-DL.DD5.1.H264-NTb', 'download_count': 607, 'languages': ['zh_chs', 'zh_cht', 'en', 'zh_en'], 'exts': ['srt', 'ass', 'ssa']}, {'link': 'http://www.zimuku.la/detail/123488.html', 'rate': '0', 'author': 'NEW字幕组', 'title': 'Titans.2018.S02E03.Ghosts.720p.DCU.WEB-DL.DD5.1.H264-NTb.NEW字幕组.zip', 'download_count': 479, 'languages': ['zh_chs', 'en', 'zh_en'], 'exts': ['srt', 'ass', 'ssa']}, {'link': 'http://www.zimuku.la/detail/123491.html', 'rate': '0', 'author': 'F.I.X字幕侠', 'title': '泰坦 第二季(第2集-简繁英双语字幕-FIX字幕侠)Titans.2018.S02E02.Rose.1080p.DCU.WEBRip.DD5.1.H264-NTb.rar', 'download_count': 151, 'languages': ['zh_chs', 'zh_cht', 'en', 'zh_en'], 'exts': ['ass', 'ssa']}, {'link': 'http://www.zimuku.la/detail/123250.html', 'rate': '0', 'author': '擦枪字幕组', 'title': '泰坦 第二季(第2集-简繁英双语字幕-擦枪字幕组)Titans.2018.S02E02.Rose.1080p.DCU.WEB-DL.DD5.1.H264-NTb.chs.eng.rar', 'download_count': 160, 'languages': ['zh_chs', 'zh_cht', 'en', 'zh_en'], 'exts': ['srt', 'ass', 'ssa']}, {'link': 'http://www.zimuku.la/detail/123207.html', 'rate': '0', 'author': 'YYeTs字幕组', 'title': '泰坦 第2季第2集【YYeTs字幕组 简繁英双语字幕】Titans.2018.S02E02.Rose.720p/1080p.DCU.WEB-DL.DD5.1.H264-NTb', 'download_count': 1037, 'languages': ['zh_chs', 'zh_cht', 'en', 'zh_en'], 'exts': ['srt', 'ass', 'ssa']}, {'link': 'http://www.zimuku.la/detail/123184.html', 'rate': '0', 'author': 'NEW字幕组', 'title': 'Titans.2018.S02E02.Rose.720p.DCU.WEB-DL.DD5.1.H264-NTb.NEW字幕组.rar', 'download_count': 424, 'languages': ['zh_chs', 'en'], 'exts': ['srt', 'ass', 'ssa']}, {'link': 'http://www.zimuku.la/detail/123490.html', 'rate': '0', 'author': 'F.I.X字幕侠', 'title': '泰坦 第二季(第1集-简繁英双语字幕-FIX字幕侠)Titans.2018.S02E01.Trigon.REPACK.1080p.DCU.WEBRip.DD5.1.x264-NTb.rar', 'download_count': 106, 'languages': ['zh_chs', 'zh_cht', 'en', 'zh_en'], 'exts': ['ass', 'ssa']}, {'link': 'http://www.zimuku.la/detail/122957.html', 'rate': '0', 'author': '擦枪字幕组', 'title': '泰坦 第二季(第1集-简繁英双语字幕-擦枪字幕组)Titans.2018.S02E01.Trigon.1080p.DCU.WEB-DL.AAC2.0.H264-NTb.chs.eng.rar', 'download_count': 227, 'languages': ['zh_chs', 'zh_cht', 'en', 'zh_en'], 'exts': ['srt', 'ass', 'ssa']}, {'link': 'http://www.zimuku.la/detail/122919.html', 'rate': '10', 'author': 'YYeTs字幕组', 'title': '泰坦 第2季第1集【YYeTs字幕组 简繁英双语字幕】Titans.2018.S02E01.Trigon.REPACK.720p/1080p.DCU.WEB-DL.DD5.1.H264-NTb', 'download_count': 1503, 'languages': ['zh_chs', 'zh_cht', 'en', 'zh_en'], 'exts': ['srt', 'ass', 'ssa']}, {'link': 'http://www.zimuku.la/detail/122892.html', 'rate': '10', 'author': 'NEW字幕组', 'title': '【自译】泰坦.Titans.2018.S02E01.Trigon.720p.DCU.WEB-DL.AAC2.0.H264-NTb.NEW字幕组.zip', 'download_count': 630, 'languages': ['zh_chs', 'en'], 'exts': ['srt', 'ass', 'ssa']}]
[09/29 15:50:52]-[DEBUG]: subinfo: {'link': 'http://www.zimuku.la/detail/122919.html', 'rate': '10', 'author': 'YYeTs字幕组', 'title': '泰坦 第2季第1集【YYeTs字幕组 简繁英双语字幕】Titans.2018.S02E01.Trigon.REPACK.720p/1080p.DCU.WEB-DL.DD5.1.H264-NTb', 'download_count': 1503, 'languages': ['zh_chs', 'zh_cht', 'en', 'zh_en'], 'exts': ['srt', 'ass', 'ssa']}
[09/29 15:50:52]-[DEBUG]: downloadpage_link: http://www.zimuku.la/dld/122919.html
[09/29 15:50:53]-[DEBUG]: subtitle_download_link: http://www.zimuku.la/download/MTIyOTE5fDJlZDg5MTQxOWIzNzY3MjgyNTY3MjRlMnwxNTY5NzQzNDUxfGJkNzQwOTFifHJlbW90ZQ%3D%3D/svr/dx2
[09/29 15:50:55]-[DEBUG]: filepath: /volume3/entertainment/tv/Titans (2018)/Season 2/Titans.2018.S02E04.Aqualad.1080p.DCU.WEB-DL.DD5.1.H264-NTb[ettv].zip
[09/29 15:50:56]-[DEBUG]: subs: ['/volume3/entertainment/tv/Titans (2018)/Season 2/Titans.2018.S02E04.Aqualad.1080p.DCU.WEB-DL.DD5.1.H264-NTb[ettv].英文&简体.ass', '/volume3/entertainment/tv/Titans (2018)/Season 2/Titans.2018.S02E04.Aqualad.1080p.DCU.WEB-DL.DD5.1.H264-NTb[ettv].英文&简体.srt', '/volume3/entertainment/tv/Titans (2018)/Season 2/Titans.2018.S02E04.Aqualad.1080p.DCU.WEB-DL.DD5.1.H264-NTb[ettv].简体.ass', '/volume3/entertainment/tv/Titans (2018)/Season 2/Titans.2018.S02E04.Aqualad.1080p.DCU.WEB-DL.DD5.1.H264-NTb[ettv].简体.srt', '/volume3/entertainment/tv/Titans (2018)/Season 2/Titans.2018.S02E04.Aqualad.1080p.DCU.WEB-DL.DD5.1.H264-NTb[ettv].英文&繁体.ass', '/volume3/entertainment/tv/Titans (2018)/Season 2/Titans.2018.S02E04.Aqualad.1080p.DCU.WEB-DL.DD5.1.H264-NTb[ettv].英文&繁体.srt', '/volume3/entertainment/tv/Titans (2018)/Season 2/Titans.2018.S02E04.Aqualad.1080p.DCU.WEB-DL.DD5.1.H264-NTb[ettv].繁体.ass', '/volume3/entertainment/tv/Titans (2018)/Season 2/Titans.2018.S02E04.Aqualad.1080p.DCU.WEB-DL.DD5.1.H264-NTb[ettv].繁体.srt', '/volume3/entertainment/tv/Titans (2018)/Season 2/Titans.2018.S02E04.Aqualad.1080p.DCU.WEB-DL.DD5.1.H264-NTb[ettv].英文.srt']
[09/29 15:50:56]-[INFO]: Titans.2018.S02E04.Aqualad.1080p.DCU.WEB-DL.DD5.1.H264-NTb[ettv].mkv:找到 1 个字幕, 准备下载
[09/29 15:50:56]-[INFO]: ====================下载完成====================
[09/29 15:50:56]-[INFO]: Titans.2018.S02E04.Aqualad.1080p.DCU.WEB-DL.DD5.1.H264-NTb[ettv].mkv: 下载 9 个字幕

处理文件名有空格的问题

freebsd,py3.6, /abc 目录内包含文件123 .mkv (3后面有个空格)
使用扫描目录的方式查找
subfinder.py /abc/

报错信息
Traceback (most recent call last):
File "/mnt/zfsrz2/bak/Scripts/transmission/subfinder.py", line 359, in
main(path, output, threads, languages, recursive, compress)
File "/mnt/zfsrz2/bak/Scripts/transmission/subfinder.py", line 317, in main
recursive, compress)
File "/mnt/zfsrz2/bak/Scripts/transmission/subfinder.py", line 284, in downloadManySubs
for i in range(threads):
TypeError: 'float' object cannot be interpreted as an integer

提Issue的注意事项

提Issue时请提供下面必要的信息:

  • 运行的命令。

  • 错误信息。

  • 使用subfinder的--debug选项运行你的命令,然后复制输出的信息。

请正确使用Markdown格式。随便复制粘贴文字的Issue一律关掉。

常见问题

匹配不到字幕

SubFinder的基本原理就是到字幕网站搜索字幕然后选择最合适的下载,因此可能会出现查找不到字幕或者字幕不匹配视频的问题,这些问题无法完美解决。

不过射手网(shooter)有提供专门的API,所以基本上可以达到100%匹配。

待补充

建议增加对https://subhd.tv的字幕搜索器

  • 运行的命令:无
  • 错误信息:无
  • 使用subfinder的--debug选项运行你的命令,然后复制输出的信息:无

建议增加对字幕网站 https://subhd.tv 的搜索器,有一些字幕在这个网站找到的是完美的。别的网站在命令行下各种尝试下载,都下载不到完美的(主要是字幕时间短于视频总时间等问题。)

很难下载到字幕,还有一些异常信息,下载了错误的字幕

大佬你好

WINDOWS10 X64,用的EXE下载字幕

下面是一些字幕,很多都找不到字幕,但是用射手影音播放的时候可以成功匹配

09/06 14:49:27]-[INFO]: The.Gifted.S01E12-E13.eXtraction.&.X-roads.1080p.AMZN.WEB-DL.HEVC.mkv: 下载 0 个字幕
[09/06 14:49:27]-[INFO]: The.Ghost.Writer.2010.BluRay.1080p.DTS.x264-CHD.mkv: 下载 2 个字幕
[09/06 14:49:27]-[INFO]: The.Exception.2016.LIMITED.720p.BluRay.x264-DRONES.mkv: 下载 0 个字幕
[09/06 14:49:27]-[INFO]: The.Gifted.S01E09.outfoX.1080p.AMZN.WEB-DL.HEVC.mkv: 下载 0 个字幕
[09/06 14:49:27]-[INFO]: The.Gifted.S01E03.eXodus.1080p.AMZN.WEB-DL.HEVC.mkv: 下载 0 个字幕
[09/06 14:49:27]-[INFO]: The.Gambler.2014.1080p.BluRay.x264-SPARKS.mkv: 下载 4 个字幕
[09/06 14:49:27]-[INFO]: [DYGC.ORG]不良街区.2018.1080P.WEB-DL.X264.AAC.Mandarin.CHS-DYGC.mp4: 下载 0 个字幕
[09/06 14:49:27]-[INFO]: Project.Gutenberg.2018.CHINESE.1080p.BluRay.x264-WiKi.mkv: 下载 2 个字幕
[09/06 14:49:27]-[INFO]: The.Mummy.2017.German.Dubbed.AC3.DL.2160p.Ultra.HD.BluRay.HDR.x265-NIMA4K.Dual.Agrobatalha.mkv: 下载 0 个字幕
[09/06 14:49:27]-[INFO]: 风中有朵雨做的云.2019.HD1080P.X264.AAC.Mandarin.CHS.mp4: 下载 0 个字幕
[09/06 14:49:27]-[INFO]: dallas.buyers.club.2013.1080p.bluray.x264-sparks.mkv: 下载 2 个字幕
[09/06 14:49:27]-[INFO]: 布琳·布朗:唤起勇气.Brené Brown The Call To Courage.2019.HD720P.X264.AAC.English.CHS.mp4: 下载 0 个字幕
[09/06 14:49:27]-[INFO]: 美好的人生.720p.BD中字 [66影视www.66ys.tv].mp4: 下载 0 个字幕
[09/06 14:49:27]-[INFO]: 新喜剧之王2018.mp4: 下载 0 个字幕
[09/06 14:49:27]-[INFO]: i.am.not.a.witch.2017.limited.720p.bluray.x264-cadaver.mkv: 下载 2 个字幕
[09/06 14:49:27]-[INFO]: 绿毛怪格林奇.1080p.国英双语.BD中英双字[最新电影www.66ys.tv].mp4: 下载 0 个字幕
[09/06 14:49:27]-[INFO]: The.Gifted.S01E02.rX.1080p.AMZN.WEB-DL.HEVC.mkv: 下载 0 个字幕
[09/06 14:49:27]-[INFO]: Match.Point.2005.1080p.BluRay.x264.DTS-FGT.mkv: 下载 2 个字幕
[09/06 14:49:27]-[INFO]: Interstellar.2014.1080p.BluRay.x264.DTS-HD.MA.5.1-RARBG.mkv: 下载 2 个字幕
[09/06 14:49:27]-[INFO]: 环球卫士.Rim.of.the.World.2019.HD1080P.X264.AAC.English.CHS-ENG.Mp4Ba.mp4: 下载 0 个字幕
[09/06 14:49:27]-[INFO]: Ip.Man.3.2015.1080p.BluRay.x264.DTS-WiKi.mkv: 下载 2 个字幕
[09/06 14:49:27]-[INFO]: The.Gifted.S01E01.eXposed.1080p.AMZN.WEB-DL.HEVC.mkv: 下载 0 个字幕
[09/06 14:49:27]-[INFO]: The.Gifted.S01E04.eXit.strategy.1080p.AMZN.WEB-DL.HEVC.mkv: 下载 0 个字幕

下面是下载了不匹配的字幕
视频文件名为Gifted.2017.1080p.BluRay.x264-GECKOS.mkv
下载的是Gifted TV SHOW的字幕

[09/06 14:49:25]-[ERROR]: The.Gifted.S01E05.boXed.in.1080p.AMZN.WEB-DL.HEVC.mkv:搜索字幕发生错误: HTTPSConnectionPool(host='www.zimuku.la', port=443): Max retries exceeded with url: /search?q=The.Gifted.S01 (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')],)",),))
[09/06 14:49:25]-[INFO]: The.Gifted.S01E05.boXed.in.1080p.AMZN.WEB-DL.HEVC.mkv:开始使用 搜索字幕
[09/06 14:49:25]-[ERROR]: The.Gifted.S01E05.boXed.in.1080p.AMZN.WEB-DL.HEVC.mkv:搜索字幕发生错误: ('Connection aborted.', error(10054, ''))
[09/06 14:49:25]-[INFO]: The.Gifted.S01E05.boXed.in.1080p.AMZN.WEB-DL.HEVC.mkv:找到 0 个字幕, 准备下载
[09/06 14:49:27]-[ERROR]: The.Gifted.S01E08.threat.of.eXtinction.1080p.AMZN.WEB-DL.HEVC.mkv:搜索字幕发生错误: HTTPSConnectionPool(host='www.zimuku.la', port=443): Max retries exceeded with url: /search?q=The.Gifted.S01 (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')],)",),))
[09/06 14:49:27]-[INFO]: The.Gifted.S01E08.threat.of.eXtinction.1080p.AMZN.WEB-DL.HEVC.mkv:开始使用 搜索字幕
[09/06 14:49:27]-[ERROR]: The.Gifted.S01E08.threat.of.eXtinction.1080p.AMZN.WEB-DL.HEVC.mkv:搜索字幕发生错误: ('Connection aborted.', error(10054, ''))
[09/06 14:49:27]-[INFO]: The.Gifted.S01E08.threat.of.eXtinction.1080p.AMZN.WEB-DL.HEVC.mkv:找到 0 个字幕, 准备下载


下面是一些异常,是因为请求次数过多吗?因为我是选择的下载视频目录
[09/06 14:49:20]-[ERROR]: [狗十三].Einstein.and.Einstein.2013.WEB-DL.1080P.H264.AAC.Mandarin.CHS&ENG-OPS.mp4:搜索字幕发生错误: HTTPSConnectionPool(host='www.zimuku.la', port=443): Max retries exceeded with url: /search?q=%5B%E7%8B%97%E5%8D%81%E4%B8%89%5D.Einstein.and.Einstein.2013.WEB-DL (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')],)",),))
[09/06 14:49:20]-[INFO]: [狗十三].Einstein.and.Einstein.2013.WEB-DL.1080P.H264.AAC.Mandarin.CHS&ENG-OPS.mp4:开始使用 搜索字幕
[09/06 14:49:20]-[ERROR]: Gods.of.Egypt.2016.2160p.UHD.BluRay.x265-TERMiNAL.mkv:搜索字幕发生错误: HTTPSConnectionPool(host='www.zimuku.la', port=443): Max retries exceeded with url: /search?q=Gods.of.Egypt.2016.2160p.UHD.BluRay.x265-TERMiNAL (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')],)",),))
[09/06 14:49:20]-[INFO]: Gods.of.Egypt.2016.2160p.UHD.BluRay.x265-TERMiNAL.mkv:开始使用 搜索字幕
[09/06 14:49:20]-[ERROR]: [狗十三].Einstein.and.Einstein.2013.WEB-DL.1080P.H264.AAC.Mandarin.CHS&ENG-OPS.mp4:搜索字幕发生错误: ('Connection aborted.', error(10054, ''))

搜索字幕发生错误: not enough values to unpack

开始使用 搜索字幕

[04/07 19:15:35]-[ERROR]: Ballon.2018.Bluray.REMUX.GER.2160p.HEVC.TrueHD.7.1.Atmos-MOLAMOLA.mkv:搜索字幕发生错误: not enough values to unpack (expecte
d 2, got 0)
[04/07 19:15:35]-[INFO]: Ballon.2018.Bluray.REMUX.GER.2160p.HEVC.TrueHD.7.1.Atmos-MOLAMOLA.mkv:找到 0 个字幕, 准备下载
[04/07 19:15:35]-[ERROR]: La.camarista.2018.REPACK.1080p.AMZN.WEB-DL.DDP5.1.H.264-NTG.mkv:搜索字幕发生错误: not enough values to unpack (expected 2, g
ot 0)
[04/07 19:15:35]-[INFO]: La.camarista.2018.REPACK.1080p.AMZN.WEB-DL.DDP5.1.H.264-NTG.mkv:找到 0 个字幕, 准备下载
[04/07 19:15:35]-[ERROR]: They.Shall.Not.Grow.Old.2018.2160p.WEB-DL.H265.AAC-LeagueTV.mp4:搜索字幕发生错误: not enough values to unpack (expected 2, g
ot 0)
[04/07 19:15:35]-[INFO]: They.Shall.Not.Grow.Old.2018.2160p.WEB-DL.H265.AAC-LeagueTV.mp4:找到 0 个字幕, 准备下载
[04/07 19:15:35]-[ERROR]: Parasite.2019.KOREAN.2160p.BluRay.REMUX.HEVC.DTS-HD.MA.TrueHD.7.1.Atmos-FGT.mkv:搜索字幕发生错误: not enough values to unpac
k (expected 2, got 0)

使用了debug输出

[04/07 19:25:08]-[INFO]: 开始
[04/07 19:25:08]-[INFO]: Ballon.2018.Bluray.REMUX.GER.2160p.HEVC.TrueHD.7.1.Atmos-MOLAMOLA.mkv:开始使用 <zimuku> 搜索字幕
[04/07 19:25:08]-[DEBUG]: keyword: Ballon.2018.Bluray.REMUX.GER.2160p.HEVC.TrueHD.7.1.Atmos-MOLAMOLA
[04/07 19:25:08]-[DEBUG]: videoinfo: {'audio_encoding': '', 'title': 'Ballon.2018.Bluray.REMUX.GER.2160p.HEVC.TrueHD.7.1.Atmos-MOLAMOLA', 'episode': 0,
'season': 0, 'source': '', 'resolution': '', 'sub_title': '', 'video_encoding': ''}
[04/07 19:25:08]-[INFO]: Parasite.2019.KOREAN.2160p.BluRay.REMUX.HEVC.DTS-HD.MA.TrueHD.7.1.Atmos-FGT.mkv:开始使用 <zimuku> 搜索字幕
[04/07 19:25:08]-[DEBUG]: keyword: Parasite.2019.KOREAN.2160p.BluRay.REMUX.HEVC.DTS-HD.MA.TrueHD.7.1.Atmos-FGT
[04/07 19:25:08]-[DEBUG]: videoinfo: {'audio_encoding': '', 'title': 'Parasite.2019.KOREAN.2160p.BluRay.REMUX.HEVC.DTS-HD.MA.TrueHD.7.1.Atmos-FGT', 'epi
sode': 0, 'season': 0, 'source': 'BluRay', 'resolution': '', 'sub_title': '', 'video_encoding': ''}
[04/07 19:25:08]-[INFO]: La.camarista.2018.REPACK.1080p.AMZN.WEB-DL.DDP5.1.H.264-NTG.mkv:开始使用 <zimuku> 搜索字幕
[04/07 19:25:08]-[DEBUG]: keyword: La.camarista.2018.REPACK
[04/07 19:25:08]-[DEBUG]: videoinfo: {'audio_encoding': 'DDP5.1', 'title': 'La.camarista.2018.REPACK', 'episode': 0, 'season': 0, 'source': 'WEB-DL', 'r
esolution': '1080p', 'sub_title': '', 'video_encoding': 'H.264'}
[04/07 19:25:08]-[INFO]: They.Shall.Not.Grow.Old.2018.2160p.WEB-DL.H265.AAC-LeagueTV.mp4:开始使用 <zimuku> 搜索字幕
[04/07 19:25:08]-[DEBUG]: keyword: They.Shall.Not.Grow.Old.2018.2160p.WEB-DL.H265.AAC-LeagueTV
[04/07 19:25:08]-[DEBUG]: videoinfo: {'audio_encoding': '', 'title': 'They.Shall.Not.Grow.Old.2018.2160p.WEB-DL.H265.AAC-LeagueTV', 'episode': 0, 'seaso
n': 0, 'source': 'WEB-DL', 'resolution': '', 'sub_title': '', 'video_encoding': ''}
[04/07 19:25:09]-[ERROR]: La.camarista.2018.REPACK.1080p.AMZN.WEB-DL.DDP5.1.H.264-NTG.mkv:搜索字幕发生错误: Traceback (most recent call last):
  File "/home/fyh/.local/lib/python3.5/site-packages/subfinder/subfinder.py", line 172, in _download
    videofile, self.languages, self.exts)
  File "/home/fyh/.local/lib/python3.5/site-packages/subfinder/subsearcher/subsearcher.py", line 357, in search_subs
    return self._search_subs(videofile, languages, exts)
  File "/home/fyh/.local/lib/python3.5/site-packages/subfinder/subsearcher/zimuku.py", line 226, in _search_subs
    subinfo_list, referer = self._get_subinfo_list(keyword)
ValueError: not enough values to unpack (expected 2, got 0)

[04/07 19:25:09]-[INFO]: La.camarista.2018.REPACK.1080p.AMZN.WEB-DL.DDP5.1.H.264-NTG.mkv:找到 0 个字幕, 准备下载
[04/07 19:25:09]-[ERROR]: Ballon.2018.Bluray.REMUX.GER.2160p.HEVC.TrueHD.7.1.Atmos-MOLAMOLA.mkv:搜索字幕发生错误: Traceback (most recent call last):
  File "/home/fyh/.local/lib/python3.5/site-packages/subfinder/subfinder.py", line 172, in _download
    videofile, self.languages, self.exts)
  File "/home/fyh/.local/lib/python3.5/site-packages/subfinder/subsearcher/subsearcher.py", line 357, in search_subs
    return self._search_subs(videofile, languages, exts)
  File "/home/fyh/.local/lib/python3.5/site-packages/subfinder/subsearcher/zimuku.py", line 226, in _search_subs
    subinfo_list, referer = self._get_subinfo_list(keyword)
ValueError: not enough values to unpack (expected 2, got 0)

[04/07 19:25:09]-[INFO]: Ballon.2018.Bluray.REMUX.GER.2160p.HEVC.TrueHD.7.1.Atmos-MOLAMOLA.mkv:找到 0 个字幕, 准备下载
[04/07 19:25:09]-[ERROR]: Parasite.2019.KOREAN.2160p.BluRay.REMUX.HEVC.DTS-HD.MA.TrueHD.7.1.Atmos-FGT.mkv:搜索字幕发生错误: Traceback (most recent cal
l last):
  File "/home/fyh/.local/lib/python3.5/site-packages/subfinder/subfinder.py", line 172, in _download
    videofile, self.languages, self.exts)
  File "/home/fyh/.local/lib/python3.5/site-packages/subfinder/subsearcher/subsearcher.py", line 357, in search_subs
    return self._search_subs(videofile, languages, exts)
  File "/home/fyh/.local/lib/python3.5/site-packages/subfinder/subsearcher/zimuku.py", line 226, in _search_subs
    subinfo_list, referer = self._get_subinfo_list(keyword)
ValueError: not enough values to unpack (expected 2, got 0)

[04/07 19:25:09]-[INFO]: Parasite.2019.KOREAN.2160p.BluRay.REMUX.HEVC.DTS-HD.MA.TrueHD.7.1.Atmos-FGT.mkv:找到 0 个字幕, 准备下载
[04/07 19:25:13]-[ERROR]: They.Shall.Not.Grow.Old.2018.2160p.WEB-DL.H265.AAC-LeagueTV.mp4:搜索字幕发生错误: Traceback (most recent call last):
  File "/home/fyh/.local/lib/python3.5/site-packages/subfinder/subfinder.py", line 172, in _download
    videofile, self.languages, self.exts)
  File "/home/fyh/.local/lib/python3.5/site-packages/subfinder/subsearcher/subsearcher.py", line 357, in search_subs
    return self._search_subs(videofile, languages, exts)
  File "/home/fyh/.local/lib/python3.5/site-packages/subfinder/subsearcher/zimuku.py", line 226, in _search_subs
    subinfo_list, referer = self._get_subinfo_list(keyword)
ValueError: not enough values to unpack (expected 2, got 0)

[04/07 19:25:13]-[INFO]: They.Shall.Not.Grow.Old.2018.2160p.WEB-DL.H265.AAC-LeagueTV.mp4:找到 0 个字幕, 准备下载
[04/07 19:25:13]-[INFO]: ====================下载完成====================
[04/07 19:25:13]-[INFO]: Parasite.2019.KOREAN.2160p.BluRay.REMUX.HEVC.DTS-HD.MA.TrueHD.7.1.Atmos-FGT.mkv: 下载 0 个字幕
[04/07 19:25:13]-[INFO]: La.camarista.2018.REPACK.1080p.AMZN.WEB-DL.DDP5.1.H.264-NTG.mkv: 下载 0 个字幕
[04/07 19:25:13]-[INFO]: They.Shall.Not.Grow.Old.2018.2160p.WEB-DL.H265.AAC-LeagueTV.mp4: 下载 0 个字幕
[04/07 19:25:13]-[INFO]: Ballon.2018.Bluray.REMUX.GER.2160p.HEVC.TrueHD.7.1.Atmos-MOLAMOLA.mkv: 下载 0 个字幕

命令行-e -l功能不可用

环境:ubuntu18.04,python3.6
使用-l的时候: AttributeError: 'list' object has no attribute '_check_languages'
使用-e的时候: AttributeError: 'list' object has no attribute '_check_exts'

部分下载字幕出错

最新版本 1.09

不明白这个错误的含义。

[03/31 21:27:53]-[INFO]: Fortress.Of.War.2010.BluRay.1080p.DTS-HD.MA5.1.x265.10bit-BeiTai.mkv:找到 0 个字幕, 准备下载
[03/31 21:27:53]-[INFO]: The.Professor.and.the.Madman.2019.BluRay.1080p.DTS-HD.MA5.1.x265.10bit-BeiTai.mkv:开始使用 搜索字幕
[03/31 21:27:53]-[ERROR]: Free.Solo.2018.BluRay.1080p.DTS-HD.MA5.1.x265.10bit-BeiTai.mkv:搜索字幕发生错误: not enough values to unpack (expected 2, got 0)

[03/31 21:27:53]-[INFO]: Free.Solo.2018.BluRay.1080p.DTS-HD.MA5.1.x265.10bit-BeiTai.mkv:找到 0 个字幕, 准备下载
[03/31 21:27:53]-[INFO]: Official.Secrets.2019.1080p.BluRay.x264.DTS-HD.MA.5.1-FGT.mkv:开始使用 搜索字幕
[03/31 21:27:54]-[ERROR]: The.Professor.and.the.Madman.2019.BluRay.1080p.DTS-HD.MA5.1.x265.10bit-BeiTai.mkv:搜索字幕发生错误: not enough values to unpack (expected 2, got 0)

运行时遇到异常

首先感谢作者为大家制作这么方便的软件。
在抓取WestWorld S02 E03时遇到异常,难道是因为这部片子还没有字幕?(看log好像不像啊。。)
控制台输出:

#./SubFinder.py ~/Downloads/Westworld.S02E03.Virtu.e.Fortuna.720p.AMZN.WEB-DL.DDP5.1.H.264-NTb.mkv
Find 1 video

Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner
    self.run()
  File "./SubFinder.py", line 222, in run
    sub_info_list = getSubInfo(f, lang)
  File "./SubFinder.py", line 146, in getSubInfo
    return res.json()
  File "/usr/lib/python3/dist-packages/requests/models.py", line 892, in json
    return complexjson.loads(self.text, **kwargs)
  File "/usr/lib/python3/dist-packages/simplejson/__init__.py", line 518, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3/dist-packages/simplejson/decoder.py", line 370, in decode
    obj, end = self.raw_decode(s)
  File "/usr/lib/python3/dist-packages/simplejson/decoder.py", line 400, in raw_decode
    return self.scan_once(s, idx=_w(s, idx).end())
simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

********************************************************************************
Finish.find 0 subtitles,0 sucessed,0 failed,0 files not found subtitle

另外,抓了另一个片子的字幕没有问题。目前只有这个出错。
请帮忙看一下,谢谢!

求docker版本

大神您好,如果您方便且有心情的话,能帮忙提供一个docker版本的么?

运行有报错

版本是最新版本 subfinder 1.0.9 ,在linux里面跑 指定了特定的配置文件

[03/23 20:18:58]-[INFO]: The.Secret.Life.of.Pets.2.2019.1080p.BluRay.x264.DTS-FGT.mkv:找到 0 个字幕, 准备下载
[03/23 20:18:58]-[INFO]: The.Invisible.Man.2020.1080p.WEB-DL.H264.AC3-EVO.mkv:开始使用 <shooter> 搜索字幕
[03/23 20:18:58]-[ERROR]: The.Invisible.Man.2020.1080p.WEB-DL.H264.AC3-EVO.mkv:搜索字幕发生错误: ShooterSubSearcher don't support "zh_en" language

[03/23 20:18:58]-[INFO]: The.Invisible.Man.2020.1080p.WEB-DL.H264.AC3-EVO.mkv:开始使用 <zimuku> 搜索字幕
[03/23 20:18:58]-[ERROR]: The.Invisible.Man.2020.1080p.WEB-DL.H264.AC3-EVO.mkv:搜索字幕发生错误: ZimukuSubSearcher don't support "zh" language

[03/23 20:18:58]-[INFO]: The.Invisible.Man.2020.1080p.WEB-DL.H264.AC3-EVO.mkv:找到 0 个字幕, 准备下载
[03/23 20:18:58]-[INFO]: Birds.of.Prey.And.the.Fantabulous.Emancipation.of.One.Harley.Quinn.2020.1080p.WEB-DL.DD5.1.H264-FGT.mkv:开始使用 <shooter> 搜索字幕
[03/23 20:18:58]-[ERROR]: Birds.of.Prey.And.the.Fantabulous.Emancipation.of.One.Harley.Quinn.2020.1080p.WEB-DL.DD5.1.H264-FGT.mkv:搜索字幕发生错误: ShooterSubSearcher don't support "zh_en" language

[03/23 20:18:58]-[INFO]: Birds.of.Prey.And.the.Fantabulous.Emancipation.of.One.Harley.Quinn.2020.1080p.WEB-DL.DD5.1.H264-FGT.mkv:开始使用 <zimuku> 搜索字幕
[03/23 20:18:58]-[ERROR]: Birds.of.Prey.And.the.Fantabulous.Emancipation.of.One.Harley.Quinn.2020.1080p.WEB-DL.DD5.1.H264-FGT.mkv:搜索字幕发生错误: ZimukuSubSearcher don't support "zh" language`



这是配置文件

{
"languages": ["zh","zh_en"],
"exts": ["ass", "srt"],
"method": ["shooter", "zimuku"],
"video_exts": [".mp4", ".mkv", ".iso"],
"api_urls": {
"zimuku": "http://www.zimuku.la/search",
"zimuzu": "http://www.rrys2019.com/search",
"zimuzu_subtitle_api_url": "http://got001.com/api/v1/static/subtitle/detail"
}
}`

运行脚本报错

root@SS:~# subfinder /volume4/4/tr/
Traceback (most recent call last):
File "/bin/subfinder", line 6, in
from subfinder.run_gevent import run
File "/usr/lib/python2.7/site-packages/subfinder/run_g�event.py", line 4, in
from gevent import monkey;monkey.patch_all()
ImportError: No module named gevent

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.