Giter Club home page Giter Club logo

getsubtitles's People

Contributors

gyh1621 avatar kevinanew avatar ksotin avatar megaslx avatar monokoo avatar wkingfly 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

getsubtitles's Issues

MissingSchema(error) MissingSchema: Invalid URL

root@DietPi:/mnt/samba/Video/Movies# getsub ./Perfect.Strangers.2017.1080p.BluRay.x264-USURY[rarbg]/ -d zimuku --plex --debug

├ perfect.strangers.2017.1080p.bluray.x264-usury.mkv
├ ./Perfect.Strangers.2017.1080p.BluRay.x264-USURY[rarbg]/

├ error:Invalid URL '/download/NTIzODd8NDA1ZTA5NDZiY2U3ODIzZjBkMDI0OTI1fDE1NDY4Mzk5NjZ8YmU1MTNhYTJ8cmVtb3Rl/svr/dx1': No schema supplied. Perhaps you meant http:///download/NTIzODd8NDA1ZTA5NDZiY2U3ODIzZjBkMDI0OTI1fDE1NDY4Mzk5NjZ8YmU1MTNhYTJ8cmVtb3Rl/svr/dx1?.

===============================FAILED LIST===============================

  1. name: perfect.strangers.2017.1080p.bluray.x264-usury.mkv
    path: ./Perfect.Strangers.2017.1080p.BluRay.x264-USURY[rarbg]/
    info: Invalid URL '/download/NTIzODd8NDA1ZTA5NDZiY2U3ODIzZjBkMDI0OTI1fDE1NDY4Mzk5NjZ8YmU1MTNhYTJ8cmVtb3Rl/svr/dx1': No schema supplied. Perhaps you meant http:///download/NTIzODd8NDA1ZTA5NDZiY2U3ODIzZjBkMDI0OTI1fDE1NDY4Mzk5NjZ8YmU1MTNhYTJ8cmVtb3Rl/svr/dx1?.
    TRACE_BACK: Traceback (most recent call last):
    File "/usr/local/lib/python2.7/dist-packages/getsub/main.py", line 615, in start
    sub_choice, link, session, info_dict)
    File "/usr/local/lib/python2.7/dist-packages/getsub/main.py", line 514, in process_archive
    sub_choice, link, session=session
    File "/usr/local/lib/python2.7/dist-packages/getsub/zimuku.py", line 196, in download_file
    with closing(session.get(download_link, stream=True)) as response:
    File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 546, in get
    return self.request('GET', url, **kwargs)
    File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 519, in request
    prep = self.prepare_request(req)
    File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 462, in prepare_request
    hooks=merge_hooks(request.hooks, self.hooks),
    File "/usr/local/lib/python2.7/dist-packages/requests/models.py", line 313, in prepare
    self.prepare_url(url, params)
    File "/usr/local/lib/python2.7/dist-packages/requests/models.py", line 387, in prepare_url
    raise MissingSchema(error)
    MissingSchema: Invalid URL '/download/NTIzODd8NDA1ZTA5NDZiY2U3ODIzZjBkMDI0OTI1fDE1NDY4Mzk5NjZ8YmU1MTNhYTJ8cmVtb3Rl/svr/dx1': No schema supplied. Perhaps you meant http:///download/NTIzODd8NDA1ZTA5NDZiY2U3ODIzZjBkMDI0OTI1fDE1NDY4Mzk5NjZ8YmU1MTNhYTJ8cmVtb3Rl/svr/dx1?

total: 1 success: 0 fail: 1

请更新zimuzu下载地址

请更新zimuzu地址为最新www.zmz2019.com

另,同样的文件,不加参数下载出错,-s手动选择字幕库就可以下载成功

user@nas# getsub *.mkv --debug

├ Batman.Ninja.2018.1080p.BluRay.x264.DTS-HD.MA.5.1-MT.mkv
├ /volume2/video/movie/Batman.Ninja.2018.1080p.BluRay.x264.DTS-HD.MA.5.1-MT

├ error:unknown error. try again.

===============================FAILED LIST===============================

  1. name: Batman.Ninja.2018.1080p.BluRay.x264.DTS-HD.MA.5.1-MT.mkv
    path: /volume2/video/movie/Batman.Ninja.2018.1080p.BluRay.x264.DTS-HD.MA.5.1-MT
    info: unknown error. try again.
    TRACE_BACK: Traceback (most recent call last):
    File "/usr/lib/python2.7/site-packages/getsub/main.py", line 592, in start
    downloader.get_subtitles(tuple(keywords))
    File "/usr/lib/python2.7/site-packages/getsub/zimuzu.py", line 46, in get_subtitles
    tab_text = bs_obj.find('div', {'class': 'article-tab'}).text
    AttributeError: 'NoneType' object has no attribute 'text'

total: 1 success: 0 fail: 1

建议增加选项“指定搜索关键字”

搭配 radarr, sonarr 等使用时,经常会对文件进行重新命名整理。这种情况下,如果能够使用原始文件名进行搜索,可以提高字幕匹配的成功率和精确度。

下载出错,保存的文件为0大小

├ Black.Panther.2018.1080p.BluRay.H264.AAC-RARBG.mp4
├ E:\Black.Panther.2018.1080p.BluRay.H264.AAC-RARBG

├ 1) 【简】【繁】【英】【双】 [SUBHD]黑豹.Black.Panther.2018.1080p.BluRay.Orange字幕组&远鉴字幕组
├ 2) 【简】 【英】【双】 [SUBHD][黑豹].Black.Panther.2018.1080p.BluRay.H264.AAC-RARBG
├ 3) 【简】 【英】【双】 [SUBHD]【远鉴字幕组&Orange字幕组】黑豹【蓝光版特效中英双字】[email protected]
├ 4) 【简】 【双】 [SUBHD]【远鉴字幕组&Orange字幕组】黑豹 Black.Panther.2018.1080p.BluRay.x264-SPARKS @CHDBits
├ 5) 【繁】 [SUBHD]黑豹 Black Panther

├ choose subtitle: 3

├ Get '[SUBHD]【远鉴字幕组&Orange字幕组】黑豹【蓝光版特效中英双字】[email protected]'... 100.00%
├ error:Unrar not installed?add --debug to get more info of the error

===============================FAILED LIST===============================

  1. name: Black.Panther.2018.1080p.BluRay.H264.AAC-RARBG.mp4
    path: E:\Black.Panther.2018.1080p.BluRay.H264.AAC-RARBG
    info: Unrar not installed?add --debug to get more info of the error

total: 1 success: 0 fail:

getsub E:\aria2down\Black.Panther.2018.1080p.BluRay.H264.AAC-RARBG\Black.Panther.2018.1080p.BluRay.H264.AAC-RARBG.mp4 -d subhd -q

├ Black.Panther.2018.1080p.BluRay.H264.AAC-RARBG.mp4
├ E:\aria2down\Black.Panther.2018.1080p.BluRay.H264.AAC-RARBG

├ 1) 【简】【繁】【英】【双】 [SUBHD]黑豹.Black.Panther.2018.1080p.BluRay.Orange字幕组&远鉴字幕组
├ 2) 【简】 【英】【双】 [SUBHD][黑豹].Black.Panther.2018.1080p.BluRay.H264.AAC-RARBG
├ 3) 【简】 【英】【双】 [SUBHD]【远鉴字幕组&Orange字幕组】黑豹【蓝光版特效中英双字】[email protected]
├ 4) 【简】 【双】 [SUBHD]【远鉴字幕组&Orange字幕组】黑豹 Black.Panther.2018.1080p.BluRay.x264-SPARKS @CHDBits
├ 5) 【繁】 [SUBHD]黑豹 Black Panther

├ choose subtitle: 2

├ Get '[SUBHD][黑豹].Black.Panther.2018.1080p.BluRay.H264.AAC-RARBG'... 100.00%
├ error:max() arg is an empty sequence. add --debug to get more info of the error

===============================FAILED LIST===============================

  1. name: Black.Panther.2018.1080p.BluRay.H264.AAC-RARBG.mp4
    path: E:\Black.Panther.2018.1080p.BluRay.H264.AAC-RARBG
    info: max() arg is an empty sequence. add --debug to get more info of the error

total: 1 success: 0 fail: 1

win10 python3.6,其他py程序正常,比如网易音乐那些的。求解
用-D -Q参数指定也是这样

subhd.py 字幕字典排序问题

    if (len(sub_dict.items()) > 0
            and list(sub_dict.items())[0][1]['lan'] < 8):
        # 第一个候选字幕没有双语
        sub_dict = order_dict(
            sorted(sub_dict.items(),
                   key=lambda e: e[1]['lan'], reverse=False)
        )

reverse=False应当改为True使字典按分数降序排列

KeyError: 'content-disposition'

1. name: After.the.Storm.2016.1080p.BluRay.x264-WiKi.mkv path: /root/nfs/Movies info: 'content-disposition'. TRACE_BACK: Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/getsub/main.py", line 615, in start sub_choice, link, session, info_dict) File "/usr/local/lib/python2.7/dist-packages/getsub/main.py", line 514, in process_archive sub_choice, link, session=session File "/usr/local/lib/python2.7/dist-packages/getsub/zimuku.py", line 192, in download_file filename = response.headers['Content-Disposition'] File "/usr/local/lib/python2.7/dist-packages/requests/structures.py", line 52, in __getitem__ return self._store[key.lower()][1] KeyError: 'content-disposition'

这个报错会偶发,视频文件名是匹配的,通过 -q 是可以正常获得搜索结果,但是依然会提示这个错误...

通过尝试修改文件名依然会引发错误...

在-q时候能否再多给点选择?

有时候挺好匹配的片子因为有美剧之类的造成选择过多以至于正确的选项不在前五个。
或者匹配条件再考虑一下?kodi里的shooter插件匹配的就挺准确?

├ Fury.2014.2160p.UHD.BluRay.x265-TERMiNAL.mkv
├ 1) 【繁】 [SUBHD]阴曹使者.The.Divine.Fury.2019.1080p.FHDRip.H264.AAC-MreD
├ 2) 【简】 [SUBHD]【使者 The.Divine.Fury】2019.特效字幕.FHDRip.FIX字幕侠
├ 3) 【简】 [SUBHD]精武门 Fist.of.Fury.1972
├ 4) 【简】【繁】 [SUBHD]铁拳第2季第1集Marvels.Iron.Fist.S02E01.The.Fury.of.the.Iron.Fist.1080p.NF.WEB-DL.DDP5.1.x264-NTG
├ 5) 【简】【繁】【英】【双】 [SUBHD]【闪电侠 The.Flash】S04E19.中英特效双语字幕.WEBDL.FIX字幕侠

ImportError: cannot import name 'HTMLParseError'

当运行getsub时, 会出现下面的报错:

Traceback (most recent call last):
File "/home/xxx/.local/bin/getsub", line 6, in
from getsub.main import main
File "/home/xxx/.local/lib/python3.5/site-packages/getsub/main.py", line 20, in
from getsub.subhd import SubHDDownloader
File "/home/xxx/.local/lib/python3.5/site-packages/getsub/subhd.py", line 12, in
from bs4 import BeautifulSoup
File "/home/xxx/.local/lib/python3.5/site-packages/bs4/init.py", line 30, in
from .builder import builder_registry, ParserRejectedMarkup
File "/home/xxx/.local/lib/python3.5/site-packages/bs4/builder/init.py", line 308, in
from . import _htmlparser
File "/home/xxx/.local/lib/python3.5/site-packages/bs4/builder/_htmlparser.py", line 7, in
from html.parser import (
ImportError: cannot import name 'HTMLParseError'

Python版本: 3.5.2

Error:Failed the read enough data

经常出现这个错误,有时能找到好的字幕,有时连续都是错误。

xMacBook-Pro:~ x$ getsub /Volumes/x.ddns.net/video/TV\ play/Unbelievable 
no valid path specfied,download sub file to video file location.

├  Unbelievable.S01E01.iNTERNAL.1080p.WEB.X264-AMRAP.mkv
├  /Volumes/x.ddns.net/video/TV play/Unbelievable
├ 
├  subtitle already exists, add '-o' to replace it.

├  Unbelievable.S01E04.iNTERNAL.1080p.WEB.X264-AMRAP.mkv
├  /Volumes/x.ddns.net/video/TV play/Unbelievable
├ 
├  Get '[SUBHD]【难以置信 Unbelievable】S01E04.中英特...'...  100.00%%%
├  Error:Failed the read enough data
├  Get '[SUBHD]难以置信 第1季第4集(Unbelievable S01E04)'...  100.00%
├  Unbelievable.S01E04.720p.WEBRip.X264-METCON.简体&英文.ass

Error with rar file

Thanks for the great work!
I found when searching subtitles with rar file, it always getting this error:

    info: Failed the read enough data.
    TRACE_BACK: Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/main.py", line 484, in start
    sub_data_bytes, info_dict, self.single
  File "/usr/local/lib/python3.6/site-packages/main.py", line 397, in extract_subtitle
    sub.write(file_handler.read(sub_name))
  File "/usr/local/lib/python3.6/site-packages/rarfile.py", line 772, in read
    return f.read()
  File "/usr/local/lib/python3.6/site-packages/rarfile.py", line 2010, in read
    raise BadRarFile("Failed the read enough data")
rarfile.BadRarFile: Failed the read enough data

error:'content-length' from zimuzu

下载器選 zimuzu 會出現此錯誤,選 subhd 正常
getsub B:\The.Flash.2014.S04E10.720p.HDTV.x264-AVS.mkv -d zimuzu

├ The.Flash.2014.S04E10.720p.HDTV.x264-AVS.mkv
├ B:

├ error:'content-length'. add --debug to get more info of the error

===============================FAILED LIST===============================

  1. name: The.Flash.2014.S04E10.720p.HDTV.x264-AVS.mkv
    path: B:
    info: 'content-length'. add --debug to get more info of the error

total: 1 success: 0 fail: 1

SubHD 获取字幕失败

报错如下:

info: Expecting value: line 1 column 1 (char 0).

似乎SubHD已经更换域名为subhd.tv,或者网页结构也发生了变化?期待作者更新~

不知道能否增加一个下载字幕到指定文件夹的参数

因为平时使用kodi,kodi设置字幕目录的时候比较烦,要么从视频目录读取,要么设置为特定的目录。由于总会有情况脚本或者kodi插件下载不到字幕要自己去网站上下载的情况出现,所以设置为特定目录比较简单,自己下载的时候只需要丢到特定的文件夹就行了(winrar解压缩的时候只要方向键翻到历史记录就行)
我现在手动改了脚本里面的字幕保存目录,但是没去仔细研究代码,所以下载字幕的时候不会判断指定的目录有没有已存在的字幕文件。要是能增加一个参数指定目录就再好不过了,谢谢!

某些字幕下载失败

某些字幕下载失败,并在文件夹下建立了一个0字节的字幕文件,尝试用debug模式,显示如下log:

shaogongyudeiMac:~ shaogongyu$ getsub /Volumes/视频/Shameless.US.S08E12.1080p.WEB.H264-DEFLATE[rarbg]/Shameless.US.S08E12.1080p.WEB.H264-DEFLATE.mkv --debug

├ Shameless.US.S08E12.1080p.WEB.H264-DEFLATE.mkv
├ /Volumes/视频/Shameless.US.S08E12.1080p.WEB.H264-DEFLATE[rarbg]

├ Get '[ZMZ]Shameless.US.S08E12.Sleepwalking...'... 100.00%
├ error:Failed the read enough data.

===============================FAILED LIST===============================

  1. name: Shameless.US.S08E12.1080p.WEB.H264-DEFLATE.mkv
    path: /Volumes/视频/Shameless.US.S08E12.1080p.WEB.H264-DEFLATE[rarbg]
    info: Failed the read enough data.
    TRACE_BACK: Traceback (most recent call last):
    File "/Users/shaogongyu/anaconda3/lib/python3.6/site-packages/main.py", line 496, in start
    sub_data_bytes, info_dict, self.single
    File "/Users/shaogongyu/anaconda3/lib/python3.6/site-packages/main.py", line 406, in extract_subtitle
    sub.write(file_handler.read(sub_name))
    File "/Users/shaogongyu/anaconda3/lib/python3.6/site-packages/rarfile.py", line 772, in read
    return f.read()
    File "/Users/shaogongyu/anaconda3/lib/python3.6/site-packages/rarfile.py", line 2010, in read
    raise BadRarFile("Failed the read enough data")
    rarfile.BadRarFile: Failed the read enough data

total: 1 success: 0 fail: 1

debian下下载出错

$ getsub -m Mr.Mercedes.S01E10.Jibber-Jibber.Chicken.Dinner.720p.DTV.WEB-DL.DD2.0.x264-NTb.mkv -q -s --debug

├ Mr.Mercedes.S01E10.Jibber-Jibber.Chicken.Dinner.720p.DTV.WEB-DL.DD2.0.x264-NTb.mkv
├ /home/cgq

├ 1) 【简】【繁】【英】【双】 [ZMZ]Mr.Mercedes.S01E10.Jibber-Jibber.Chicken.Dinner.720p.DTV.WEB-DL.DD2.0.x264-NTb
├ 2) 【简】【繁】【英】【双】 [ZMZ]Mr.Mercedes.S01E09.Ice.Cream.You.Scream.We.All.Scream.720p.DTV.WEB-DL.DD2.0.x264-NTb
├ 3) 【简】【繁】【英】【双】 [ZMZ]Mr.Mercedes.S01E08.From.The.Ashes.720p.REPACK.DTV.WEB-DL.DD2.0.x264-NTb
├ 4) 【简】【繁】【英】【双】 [ZMZ]Mr.Mercedes.S01E07.Willow.Lake.720p.DTV.WEB-DL.DD
├ 5) 【简】【繁】【英】【双】 [ZMZ]Mr.Mercedes.S01E06.720p.WEBRip.x264-eSc

├ choose subtitle: 1
├ error:expected string or buffer.

===============================FAILED LIST===============================

  1. name: Mr.Mercedes.S01E10.Jibber-Jibber.Chicken.Dinner.720p.DTV.WEB-DL.DD2.0.x264-NTb.mkv
    path: /home/cgq
    info: expected string or buffer.
    TRACE_BACK: Traceback (most recent call last):
    File "/home/cgq/.local/lib/python2.7/site-packages/main.py", line 583, in start
    sub_choices = self.choose_subtitle(sub_dict)
    File "/home/cgq/.local/lib/python2.7/site-packages/main.py", line 207, in choose_subtitle
    choices = [int(c) for c in re.split(',|,', choices)]
    File "/usr/lib/python2.7/re.py", line 171, in split
    return _compile(pattern, flags).split(string, maxsplit)
    TypeError: expected string or buffer

total: 1 success: 0 fail: 1

Random ValueError: unused keyword argument 'xxxxxx'

For instances:

ERROR:An internal error has occured in guessit.
===================== Guessit Exception Report =====================
version=3.1.0
string=Ford.v.Ferrari.2019.UHD.BluRay.2160p.TrueHD.Atmos.7.1.HEVC.REMUX-FraMeSToR.mkv
options={}
--------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/petrus/.local/lib64/python3.6/site-packages/guessit/api.py", line 192, in guessit
    config = self.configure(options, sanitize_options=False)
  File "/home/petrus/.local/lib64/python3.6/site-packages/guessit/api.py", line 163, in configure
    self.rebulk = rules_builder(advanced_config)
  File "/home/petrus/.local/lib64/python3.6/site-packages/guessit/rules/__init__.py", line 56, in rebulk_builder
    rebulk.rebulk(episodes(_config('episodes')))
  File "/home/petrus/.local/lib64/python3.6/site-packages/guessit/rules/properties/episodes.py", line 175, in episodes
    build_or_pattern(episode_markers + disc_markers, name='episodeMarker') + r'@?(?P<episode>\d+)')\
  File "/home/petrus/.local/lib64/python3.6/site-packages/rebulk/builder.py", line 179, in regex
    return self.pattern(self.build_re(*pattern, **kwargs))
  File "/home/petrus/.local/lib64/python3.6/site-packages/rebulk/builder.py", line 107, in build_re
    return RePattern(*pattern, **kwargs)
  File "/home/petrus/.local/lib64/python3.6/site-packages/rebulk/pattern.py", line 441, in __init__
    pattern = call(re.compile, pattern, **self._kwargs)
  File "/home/petrus/.local/lib64/python3.6/site-packages/rebulk/loose.py", line 60, in call
    return function(*call_args, **call_kwargs)
  File "/usr/lib64/python3.6/site-packages/regex/regex.py", line 348, in compile
    return _compile(pattern, flags, ignore_unused, kwargs)
  File "/usr/lib64/python3.6/site-packages/regex/regex.py", line 585, in _compile
    raise ValueError('unused keyword argument {!a}'.format(any_one))
ValueError: unused keyword argument 'private_parent'
--------------------------------------------------------------------

But if you run getsub again, it will show another error:

Searching SUBHD...^MERROR:An internal error has occured in guessit.
===================== Guessit Exception Report =====================
version=3.1.0
string=Ford.v.Ferrari.2019.UHD.BluRay.2160p.TrueHD.Atmos.7.1.HEVC.REMUX-FraMeSToR.mkv
options={}
--------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/petrus/.local/lib64/python3.6/site-packages/guessit/api.py", line 192, in guessit
    config = self.configure(options, sanitize_options=False)
  File "/home/petrus/.local/lib64/python3.6/site-packages/guessit/api.py", line 163, in configure
    self.rebulk = rules_builder(advanced_config)
  File "/home/petrus/.local/lib64/python3.6/site-packages/guessit/rules/__init__.py", line 56, in rebulk_builder
    rebulk.rebulk(episodes(_config('episodes')))
  File "/home/petrus/.local/lib64/python3.6/site-packages/guessit/rules/properties/episodes.py", line 175, in episodes
    build_or_pattern(episode_markers + disc_markers, name='episodeMarker') + r'@?(?P<episode>\d+)')\
  File "/home/petrus/.local/lib64/python3.6/site-packages/rebulk/builder.py", line 179, in regex
    return self.pattern(self.build_re(*pattern, **kwargs))
  File "/home/petrus/.local/lib64/python3.6/site-packages/rebulk/builder.py", line 107, in build_re
    return RePattern(*pattern, **kwargs)
  File "/home/petrus/.local/lib64/python3.6/site-packages/rebulk/pattern.py", line 441, in __init__
    pattern = call(re.compile, pattern, **self._kwargs)
  File "/home/petrus/.local/lib64/python3.6/site-packages/rebulk/loose.py", line 60, in call
    return function(*call_args, **call_kwargs)
  File "/usr/lib64/python3.6/site-packages/regex/regex.py", line 348, in compile
    return _compile(pattern, flags, ignore_unused, kwargs)
  File "/usr/lib64/python3.6/site-packages/regex/regex.py", line 585, in _compile
    raise ValueError('unused keyword argument {!a}'.format(any_one))
ValueError: unused keyword argument 'abbreviations'
--------------------------------------------------------------------

Python version:Python 3.6.10

字幕下载失败

├ I.Robot.2004.1080p.Bluray.x264.DTS-DEFiNiTE.mkv
├ /Volumes/video/I.Robot.2004.1080p.Bluray.x264.DTS-DEFiNiTE
├
├ Get '[ZMZ]I.Robot.2004.OPEN.MATTE.720p.BluRay.DTS.x264-PublicHD'...  100.00%
├ error:'utf8' codec can't decode byte 0xbc in position 108: invalid start byte.

===============================FAILED LIST===============================

 1. name: I.Robot.2004.1080p.Bluray.x264.DTS-DEFiNiTE.mkv
    path: /Volumes/video/I.Robot.2004.1080p.Bluray.x264.DTS-DEFiNiTE
    info: 'utf8' codec can't decode byte 0xbc in position 108: invalid start byte.
    TRACE_BACK: Traceback (most recent call last):
  File "/Library/Python/2.7/site-packages/main.py", line 505, in start
    sub_data_bytes, info_dict, self.single
  File "/Library/Python/2.7/site-packages/main.py", line 401, in extract_subtitle
    + os.path.splitext(sub_name.decode('utf8'))[1]
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/encodings/utf_8.py", line 16, in decode
    return codecs.utf_8_decode(input, errors, True)
UnicodeDecodeError: 'utf8' codec can't decode byte 0xbc in position 108: invalid start byte


total: 1  success: 0  fail: 1

群晖无法安装新版

1.7.0.0版本以后需要pylzma>=0.5.0
但是群晖系统是装不上这个的
请问这个是必须依赖么?

建议加入伪射手

这几个源,对动画的支持约等于0
电影和动画,资源也好字幕也好,完全是两个世界
射手倒了之后,再也没什么全能的字幕站了

程序异常

➜ ~ getsub 'Airwolf_-1x11-_Mind_Of_The_Machine.(DVD).uDF.avi' --debug

├ Airwolf_-1x11-_Mind_Of_The_Machine.(DVD).uDF.avi
├ /Users/probestar

├ error:Expecting value: line 1 column 1 (char 0).

===============================FAILED LIST===============================

  1. name: Airwolf_-1x11-_Mind_Of_The_Machine.(DVD).uDF.avi
    path: /Users/probestar
    info: Expecting value: line 1 column 1 (char 0).
    TRACE_BACK: Traceback (most recent call last):
    File "/usr/local/lib/python3.7/site-packages/getsub/main.py", line 623, in start
    sub_choice, link, session, info_dict)
    File "/usr/local/lib/python3.7/site-packages/getsub/main.py", line 513, in process_archive
    download_file(sub_choice, link)
    File "/usr/local/lib/python3.7/site-packages/getsub/subhd.py", line 127, in download_file
    if json.loads(content)['success'] is False:
    File "/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/lib/python3.7/json/init.py", line 348, in loads
    return _default_decoder.decode(s)
    File "/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/lib/python3.7/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
    File "/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/lib/python3.7/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
    json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

total: 1 success: 0 fail: 1

error:connect failed, check network status.

F:\TvSeries\Marvel's Agents of S.H.I.E.L.D\Season 5>getsub ./ --debug

├ Marvel's.Agents.of.S.H.I.E.L.D.S05E11.1080p.AMZN.WEB-DL.DDP5.1.H.264-ViSUM.mkv
├ ./

├ error:connect failed, check network status.

├ Marvel's.Agents.of.S.H.I.E.L.D.S05E12.1080p.AMZN.WEB-DL.DDP5.1.H.264-ViSUM.mkv
├ ./

├ error:connect failed, check network status.

├ Marvel's.Agents.of.S.H.I.E.L.D.S05E13.1080p.AMZN.WEB-DL.DDP5.1.H.264-ViSUM.mkv
├ ./

├ error:connect failed, check network status.

├ Marvel's.Agents.of.S.H.I.E.L.D.S05E14.1080p.REPACK.AMZN.WEB-DL.DDP5.1.H.264-ViSUM.mkv
├ ./

├ error:connect failed, check network status.

├ Marvels.Agents.of.S.H.I.E.L.D.S05E01.1080p.AMZN.WEB-DL.DDP5.1.H.264-ViSUM.mkv
├ ./

├ error:connect failed, check network status.

├ Marvels.Agents.of.S.H.I.E.L.D.S05E02.1080p.AMZN.WEB-DL.DDP5.1.H.264-ViSUM.mkv
├ ./

├ error:connect failed, check network status.

├ Marvels.Agents.of.S.H.I.E.L.D.S05E03.1080p.AMZN.WEB-DL.DDP5.1.H.264-ViSUM.mkv
├ ./

├ error:connect failed, check network status.

├ Marvels.Agents.of.S.H.I.E.L.D.S05E04.1080p.AMZN.WEB-DL.DDP5.1.H.264-ViSUM.mkv
├ ./

├ error:connect failed, check network status.

├ Marvels.Agents.of.S.H.I.E.L.D.S05E05.1080p.AMZN.WEB-DL.DDP5.1.H.264-ViSUM.mkv
├ ./

├ error:connect failed, check network status.

├ Marvels.Agents.of.S.H.I.E.L.D.S05E06.1080p.AMZN.WEB-DL.DDP5.1.H.264-ViSUM.mkv
├ ./

├ error:connect failed, check network status.

├ Marvels.Agents.of.S.H.I.E.L.D.S05E07.1080p.AMZN.WEB-DL.DDP5.1.H.264-ViSUM.mkv
├ ./

├ error:connect failed, check network status.

├ Marvels.Agents.of.S.H.I.E.L.D.S05E08.1080p.AMZN.WEB-DL.DDP5.1.H.264-ViSUM.mkv
├ ./

├ error:connect failed, check network status.

├ Marvels.Agents.of.S.H.I.E.L.D.S05E09.1080p.AMZN.WEB-DL.DDP5.1.H.264-ViSUM.mkv
├ ./

├ error:connect failed, check network status.

├ Marvels.Agents.of.S.H.I.E.L.D.S05E10.1080p.AMZN.WEB-DL.DDP5.1.H.264-ViSUM.mkv
├ ./

├ error:connect failed, check network status.

├ Marvels.Agents.of.S.H.I.E.L.D.S05E15.720p.HDTV.x264-AVS.mkv
├ ./

├ error:unknown error. try again.

===============================FAILED LIST===============================

  1. name: Marvel's.Agents.of.S.H.I.E.L.D.S05E11.1080p.AMZN.WEB-DL.DDP5.1.H.264-ViSUM.mkv
    path: ./
    info: connect failed, check network status.
    TRACE_BACK:
  2. name: Marvel's.Agents.of.S.H.I.E.L.D.S05E12.1080p.AMZN.WEB-DL.DDP5.1.H.264-ViSUM.mkv
    path: ./
    info: connect failed, check network status.
    TRACE_BACK:
  3. name: Marvel's.Agents.of.S.H.I.E.L.D.S05E13.1080p.AMZN.WEB-DL.DDP5.1.H.264-ViSUM.mkv
    path: ./
    info: connect failed, check network status.
    TRACE_BACK:
  4. name: Marvel's.Agents.of.S.H.I.E.L.D.S05E14.1080p.REPACK.AMZN.WEB-DL.DDP5.1.H.264-ViSUM.mkv
    path: ./
    info: connect failed, check network status.
    TRACE_BACK:
  5. name: Marvels.Agents.of.S.H.I.E.L.D.S05E01.1080p.AMZN.WEB-DL.DDP5.1.H.264-ViSUM.mkv
    path: ./
    info: connect failed, check network status.
    TRACE_BACK:
  6. name: Marvels.Agents.of.S.H.I.E.L.D.S05E02.1080p.AMZN.WEB-DL.DDP5.1.H.264-ViSUM.mkv
    path: ./
    info: connect failed, check network status.
    TRACE_BACK:
  7. name: Marvels.Agents.of.S.H.I.E.L.D.S05E03.1080p.AMZN.WEB-DL.DDP5.1.H.264-ViSUM.mkv
    path: ./
    info: connect failed, check network status.
    TRACE_BACK:
  8. name: Marvels.Agents.of.S.H.I.E.L.D.S05E04.1080p.AMZN.WEB-DL.DDP5.1.H.264-ViSUM.mkv
    path: ./
    info: connect failed, check network status.
    TRACE_BACK:
  9. name: Marvels.Agents.of.S.H.I.E.L.D.S05E05.1080p.AMZN.WEB-DL.DDP5.1.H.264-ViSUM.mkv
    path: ./
    info: connect failed, check network status.
    TRACE_BACK:
  10. name: Marvels.Agents.of.S.H.I.E.L.D.S05E06.1080p.AMZN.WEB-DL.DDP5.1.H.264-ViSUM.mkv
    path: ./
    info: connect failed, check network status.
    TRACE_BACK:
  11. name: Marvels.Agents.of.S.H.I.E.L.D.S05E07.1080p.AMZN.WEB-DL.DDP5.1.H.264-ViSUM.mkv
    path: ./
    info: connect failed, check network status.
    TRACE_BACK:
  12. name: Marvels.Agents.of.S.H.I.E.L.D.S05E08.1080p.AMZN.WEB-DL.DDP5.1.H.264-ViSUM.mkv
    path: ./
    info: connect failed, check network status.
    TRACE_BACK:
  13. name: Marvels.Agents.of.S.H.I.E.L.D.S05E09.1080p.AMZN.WEB-DL.DDP5.1.H.264-ViSUM.mkv
    path: ./
    info: connect failed, check network status.
    TRACE_BACK:
  14. name: Marvels.Agents.of.S.H.I.E.L.D.S05E10.1080p.AMZN.WEB-DL.DDP5.1.H.264-ViSUM.mkv
    path: ./
    info: connect failed, check network status.
    TRACE_BACK:
  15. name: Marvels.Agents.of.S.H.I.E.L.D.S05E15.720p.HDTV.x264-AVS.mkv
    path: ./
    info: unknown error. try again.
    TRACE_BACK: Traceback (most recent call last):
    File "d:\program-files\python36\lib\site-packages\main.py", line 438, in start
    downloader.get_subtitles(tuple(keywords))
    File "d:\program-files\python36\lib\site-packages\zimuzu.py", line 46, in get_subtitles
    tab_text = bs_obj.find('div', {'class': 'article-tab'}).text
    AttributeError: 'NoneType' object has no attribute 'text'

有关subhd获取字幕失败

Hi, 一直正常使用,十分感谢!最近出现个bug,下载subhd字幕失败,zimuzu的没问题,有空帮忙看一下是哪儿出问题了。

xxx:~ xxx$ getsub '/Users/xxx/Downloads/Along.with.the.Gods_The.Last.49.Days.2017.1080p.FHDRip.H264.AAC-NonDRM.mp4' --debug

├ Along.with.the.Gods_The.Last.49.Days.2017.1080p.FHDRip.H264.AAC-NonDRM.mp4
├ /Users/shaogongyu/Downloads

├ error:Expecting value: line 2 column 1 (char 1).

===============================FAILED LIST===============================

  1. name: Along.with.the.Gods_The.Last.49.Days.2017.1080p.FHDRip.H264.AAC-NonDRM.mp4
    path: /Users/xxx/Downloads
    info: Expecting value: line 2 column 1 (char 1).
    TRACE_BACK: Traceback (most recent call last):
    File "/Users/xxx/anaconda3/lib/python3.6/site-packages/main.py", line 590, in start
    sub_choice, link, info_dict)
    File "/Users/xxx/anaconda3/lib/python3.6/site-packages/main.py", line 484, in process_archive
    download_file(sub_choice, link)
    File "/Users/xxx/anaconda3/lib/python3.6/site-packages/subhd.py", line 120, in download_file
    if json.loads(content)['success'] is False:
    File "/Users/xxx/anaconda3/lib/python3.6/json/init.py", line 354, in loads
    return _default_decoder.decode(s)
    File "/Users/xxx/anaconda3/lib/python3.6/json/decoder.py", line 339, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
    File "/Users/xxx/anaconda3/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 2 column 1 (char 1)

total: 1 success: 0 fail: 1

增加整季字幕直接下载

电视剧下载后一般整季一个文件夹,而 subhd 和 assert 均有明确的合集标识,当拖入一整个文件夹下载时可以指定整季下载参数来尝试一次性下载一整季的字幕包并解压匹配对应剧集字幕。

使用视频目录下载字幕报错error:[Errno 2] No such file or directory

“getsub 视频文件夹” 出现了报错提示 error:[Errno 2] No such file or directory

`├ DCs.Legends.of.Tomorrow.S04E02.720p.HDTV.x264-SVA.mkv
├ 明日传奇 第四季/DCs.Legends.of.Tomorrow.S04E02.720p.HDTV.x264-SVA[rarbg]

├ subtitle already exists, add '-o' to replace it.

├ DCs.Legends.of.Tomorrow.S04E03.720p.HDTV.x264-KILLERS.mkv
├ 明日传奇 第四季/DCs.Legends.of.Tomorrow.S04E03.720p.HDTV.x264-KILLERS[rarbg]

├ Get '[ZMZ]DCs.Legends.of.Tomorrow.S04E03.720p.HDTV.x264-KILLERS'... 100.00%
├ DCs.Legends.of.Tomorrow.S04E03.720p.HDTV.x264-KILLERS.简体&英文.ass

├ DCs.Legends.of.Tomorrow.S04E01.HDTV.x264-SVA.mkv
├ 明日传奇 第四季/DCs.Legends.of.Tomorrow.S04E01.HDTV.x264-SVA[rarbg]

├ Get '[ZMZ]DCs.Legends.of.Tomorrow.S04E01.720p.HDTV.x264-SVA.zip'... 100.00%
├ error:[Errno 2] No such file or directory: '明日传奇 第四季/DCs.Legends.of.Tomorrow.S04E01.HDTV.x264-SVA[rarbg]'.

├ DCs.Legends.of.Tomorrow.S04E04.720p.HDTV.x264-SVA.mkv
├ 明日传奇 第四季/DCs.Legends.of.Tomorrow.S04E04.720p.HDTV.x264-SVA[rarbg]

├ Get '[ZMZ]DCs.Legends.of.Tomorrow.S04E04.720p.HDTV.x264-SVA.zip'... 100.00%
├ error:[Errno 2] No such file or directory: '明日传奇 第四季/DCs.Legends.of.Tomorrow.S04E04.720p.HDTV.x264-SVA[rarbg]'.

├ DCs.Legends.of.Tomorrow.S04E06.720p.HDTV.x264-AVS.mkv
├ 明日传奇 第四季/DCs.Legends.of.Tomorrow.S04E06.720p.HDTV.x264-AVS[rarbg]

├ Get '[ZMZ]DCs.Legends.of.Tomorrow.S04E06.720p.HDTV.x264-AVS.zip'... 100.00%
├ error:[Errno 2] No such file or directory: '明日传奇 第四季/DCs.Legends.of.Tomorrow.S04E06.720p.HDTV.x264-AVS[rarbg]'.

├ DCs.Legends.of.Tomorrow.S04E07.720p.HDTV.x264-SVA.mkv
├ 明日传奇 第四季/DCs.Legends.of.Tomorrow.S04E07.720p.HDTV.x264-SVA[rarbg]
`

Zimuku 好像不能用了?

zimuku好像现在什么结果都搜不到了?

另外,非常感谢您能分享这么好的code,让我下载字幕变得容易很多了。

不知道您是否知道Bazarr这个软件?Bazarr是给Sonarr,Radarr服务的软件。Sonarr和Radarr分别是自动下载电视剧和电影的软件。然后Bazarr就会读取Sonarr和Radarr的信息,然后给视频下载字幕。Bazarr的优点在于它有一个给字幕质量打分的一个比较完善的机制(通过codec, release group, format, resolution 等等是否匹配), 然后你可以告诉Bazarr让它比如只下载95分以上的字幕。Bazarr在下载到字幕以后会再一周之内再一次自动搜索,如果有分数更高的字幕,会对现有字幕进行升级。 总而言之,这是一个比较完善的字幕管理软件。唯一的遗憾是因为开发者都不懂中文,所以对中文的这些字幕库支持不好。现在它支持assrt.net(这个有api,所以比较好维护),它也声称自己支持Zimuku. 但是Zimuku好像最近这几个月有过一次大改动?然后Zimuku就不好用了。。。开发者们因为不懂中文,也不知道怎么维护(最早是另一个懂中文的人写的这个provider文件)。

不知道您有没有兴趣和时间把您的Zimuku以及Subhd的文件改成和他们compatible的?Bazarr好像是基于Subliminal的。这是他们的github链接: https://github.com/morpheus65535/bazarr

不好意思,废话了那么多。。。我的主要目的是问Zimuku的事情。。。

新版本的安装要求有点高

新引入的pylzma模块需要Microsoft Visual C++ Build Tools,否则直接pip install安装会报错的。7z难道unrar不能胜任么?

无法传入环境变量

我设置了 transmission 在下载完成后自动运行如下的 shell 脚本

#!bin/bash
getsub --plex -o '${TR_TORRENT_DIR}/${TR_TORRENT_NAME}' | cat >> /root/getsub.log

其中 ${TR_TORRENT_DIR} 和 ${TR_TORRENT_NAME} 是 transmission 在下载完成后能够向脚本传送的环境变量。但是 getsub 没有接收到

The script will replace the old subtitles if exist...
├ ${TR_TORRENT_DIR}/${TR_TORRENT_NAME}
├ /

├ Searching SUBHD...
├ [SUBHD ERROR] The URI you submitted has disallowed characters: $ NAME
├ error:'NoneType' object is not iterable. add --debug to get more info of the error
===============================FAILED LIST===============================1. name: ${TR_TORRENT_DIR}/${TR_TORRENT_NAME}
path: /
info: 'NoneType' object is not iterable. add --debug to get more info of the error
total: 1 success: 0 fail: 1

subhd改版了。。。

初看了一下改动还蛮大的,我对html不熟悉,只能一段段代码放到新的网站数据里面去看。要等大佬来修了

是否考虑同时下载多个字幕

是否考虑同时下载多个字幕,比如2-3个同时保存,现在好像字幕后缀没有标记字幕语言,比如chs之类?
多字幕主要原因是考虑 可能1个字幕的时间轴有问题,也许另外一个是好的
以及比如2个格式,srt和ass,有的不支持ass后缀

字幕下载错误 &不支持?

├ Fast.&.Furious.Presents.Hobbs.&.Shaw.2019.1080p.WEBRip.x264-[YTS.LT].mp4
├ /volumeUSB1/usbshare/Video/Fast & Furious Presents Hobbs & Shaw (2019) [WEBRip] [1080p] [YTS.LT]

├ [SUBHD ERROR] The URI you submitted has disallowed characters: Fast & Furious Presents Hobbs & Shaw YTS.LT 1080p
├ error:'NoneType' object is not iterable. add --debug to get more info of the error

报错为啥?

  1. name: Exodus-Gods.and.Kings.2014.Bluray.1080p.DTS-HD-7.1.x264-Grym.mkv
    path: Y:\rclonegdrive\出埃及记Exodus-Gods.and.Kings.2014.Bluray.1080p.DTS-HD-7.1.x264-Grym
    info: Expecting value: line 1 column 1 (char 0).
    TRACE_BACK: Traceback (most recent call last):
    File "c:\python\python37\lib\site-packages\getsub\main.py", line 623, in start
    sub_choice, link, session, info_dict)
    File "c:\python\python37\lib\site-packages\getsub\main.py", line 513, in process_archive
    download_file(sub_choice, link)
    File "c:\python\python37\lib\site-packages\getsub\subhd.py", line 127, in download_file
    if json.loads(content)['success'] is False:
    File "c:\python\python37\lib\json_init_.py", line 348, in loads
    return _default_decoder.decode(s)
    File "c:\python\python37\lib\json\decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
    File "c:\python\python37\lib\json\decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
    json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

无法下载,不知道哪里错了

getsub Z:\movie\Spies.in.Disguise.2019.2160p.UHD.BluRay.x265-WhiteRhino\Spies.in.Disguise.2019.2160p.UHD.BluRay.x265-WhiteRhino.mkv --debug

  • Video: Spies.in.Disguise.2019.2160p.UHD.BluRay.x265-WhiteRhino.mkv
  • Video Path: Z:\movie\Spies.in.Disguise.2019.2160p.UHD.BluRay.x265-WhiteRhino
  • Subtitles Store Path: Z:\movie\Spies.in.Disguise.2019.2160p.UHD.BluRay.x265-WhiteRhino

ERROR:An internal error has occured in guessit.
===================== Guessit Exception Report =====================
version=3.1.0
string=Spies.in.Disguise.2019.2160p.UHD.BluRay.x265-WhiteRhino.mkv
options={}

Traceback (most recent call last):
File "c:\python38\lib\site-packages\guessit\api.py", line 192, in guessit
config = self.configure(options, sanitize_options=False)
File "c:\python38\lib\site-packages\guessit\api.py", line 163, in configure
self.rebulk = rules_builder(advanced_config)
File "c:\python38\lib\site-packages\guessit\rules_init_.py", line 56, in rebulk_builder
rebulk.rebulk(episodes(_config('episodes')))
File "c:\python38\lib\site-packages\guessit\rules\properties\episodes.py", line 168, in episodes
rebulk.chain(
File "c:\python38\lib\site-packages\rebulk\builder.py", line 179, in regex
return self.pattern(self.build_re(*pattern, **kwargs))
File "c:\python38\lib\site-packages\rebulk\builder.py", line 107, in build_re
return RePattern(*pattern, **kwargs)
File "c:\python38\lib\site-packages\rebulk\pattern.py", line 441, in init
pattern = call(re.compile, pattern, **self._kwargs)
File "c:\python38\lib\site-packages\rebulk\loose.py", line 60, in call
return function(*call_args, **call_kwargs)
File "c:\python38\lib\site-packages\regex\regex.py", line 348, in compile
return _compile(pattern, flags, ignore_unused, kwargs)
File "c:\python38\lib\site-packages\regex\regex.py", line 585, in _compile
raise ValueError('unused keyword argument {!a}'.format(any_one))
ValueError: unused keyword argument 'formatter'

Please report at https://github.com/guessit-io/guessit/issues.
====================================================================. failed to guess one subtitle,use '-q' to try query mode.

===============================FAILED LIST===============================

  1. name: Spies.in.Disguise.2019.2160p.UHD.BluRay.x265-WhiteRhino.mkv
    path: Z:\movie\Spies.in.Disguise.2019.2160p.UHD.BluRay.x265-WhiteRhino
    info: An internal error has occured in guessit.
    ===================== Guessit Exception Report =====================
    version=3.1.0
    string=Spies.in.Disguise.2019.2160p.UHD.BluRay.x265-WhiteRhino.mkv
    options={}

Traceback (most recent call last):
File "c:\python38\lib\site-packages\guessit\api.py", line 192, in guessit
config = self.configure(options, sanitize_options=False)
File "c:\python38\lib\site-packages\guessit\api.py", line 163, in configure
self.rebulk = rules_builder(advanced_config)
File "c:\python38\lib\site-packages\guessit\rules_init_.py", line 56, in rebulk_builder
rebulk.rebulk(episodes(_config('episodes')))
File "c:\python38\lib\site-packages\guessit\rules\properties\episodes.py", line 168, in episodes
rebulk.chain(
File "c:\python38\lib\site-packages\rebulk\builder.py", line 179, in regex
return self.pattern(self.build_re(*pattern, **kwargs))
File "c:\python38\lib\site-packages\rebulk\builder.py", line 107, in build_re
return RePattern(*pattern, **kwargs)
File "c:\python38\lib\site-packages\rebulk\pattern.py", line 441, in init
pattern = call(re.compile, pattern, **self._kwargs)
File "c:\python38\lib\site-packages\rebulk\loose.py", line 60, in call
return function(*call_args, **call_kwargs)
File "c:\python38\lib\site-packages\regex\regex.py", line 348, in compile
return _compile(pattern, flags, ignore_unused, kwargs)
File "c:\python38\lib\site-packages\regex\regex.py", line 585, in _compile
raise ValueError('unused keyword argument {!a}'.format(any_one))
ValueError: unused keyword argument 'formatter'

Please report at https://github.com/guessit-io/guessit/issues.
====================================================================. failed to guess one subtitle,use '-q' to try query mode.
TRACE_BACK: Traceback (most recent call last):
File "c:\python38\lib\site-packages\guessit\api.py", line 192, in guessit
config = self.configure(options, sanitize_options=False)
File "c:\python38\lib\site-packages\guessit\api.py", line 163, in configure
self.rebulk = rules_builder(advanced_config)
File "c:\python38\lib\site-packages\guessit\rules_init_.py", line 56, in rebulk_builder
rebulk.rebulk(episodes(_config('episodes')))
File "c:\python38\lib\site-packages\guessit\rules\properties\episodes.py", line 168, in episodes
rebulk.chain(
File "c:\python38\lib\site-packages\rebulk\builder.py", line 179, in regex
return self.pattern(self.build_re(*pattern, **kwargs))
File "c:\python38\lib\site-packages\rebulk\builder.py", line 107, in build_re
return RePattern(*pattern, **kwargs)
File "c:\python38\lib\site-packages\rebulk\pattern.py", line 441, in init
pattern = call(re.compile, pattern, **self._kwargs)
File "c:\python38\lib\site-packages\rebulk\loose.py", line 60, in call
return function(*call_args, **call_kwargs)
File "c:\python38\lib\site-packages\regex\regex.py", line 348, in compile
return _compile(pattern, flags, ignore_unused, kwargs)
File "c:\python38\lib\site-packages\regex\regex.py", line 585, in _compile
raise ValueError('unused keyword argument {!a}'.format(any_one))
ValueError: unused keyword argument 'formatter'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "c:\python38\lib\site-packages\getsub\main.py", line 170, in start
error, extract_sub_names = self.process_video(one_video, video_info)
File "c:\python38\lib\site-packages\getsub\main.py", line 117, in process_video
sub_dict = self.get_search_results(video_name)
File "c:\python38\lib\site-packages\getsub\main.py", line 64, in get_search_results
result = downloader.get_subtitles(video_name, sub_num=self.sub_num)
File "c:\python38\lib\site-packages\getsub\downloader\subhd.py", line 31, in get_subtitles
keywords, info_dict = Downloader.get_keywords(video_name)
File "c:\python38\lib\site-packages\getsub\downloader\downloader.py", line 36, in get_keywords
info_dict = guessit(video_name)
File "c:\python38\lib\site-packages\guessit\api.py", line 71, in guessit
return default_api.guessit(string, options)
File "c:\python38\lib\site-packages\guessit\api.py", line 222, in guessit
raise GuessitException(string, options)
guessit.api.GuessitException: An internal error has occured in guessit.
===================== Guessit Exception Report =====================
version=3.1.0
string=Spies.in.Disguise.2019.2160p.UHD.BluRay.x265-WhiteRhino.mkv
options={}

Traceback (most recent call last):
File "c:\python38\lib\site-packages\guessit\api.py", line 192, in guessit
config = self.configure(options, sanitize_options=False)
File "c:\python38\lib\site-packages\guessit\api.py", line 163, in configure
self.rebulk = rules_builder(advanced_config)
File "c:\python38\lib\site-packages\guessit\rules_init_.py", line 56, in rebulk_builder
rebulk.rebulk(episodes(_config('episodes')))
File "c:\python38\lib\site-packages\guessit\rules\properties\episodes.py", line 168, in episodes
rebulk.chain(
File "c:\python38\lib\site-packages\rebulk\builder.py", line 179, in regex
return self.pattern(self.build_re(*pattern, **kwargs))
File "c:\python38\lib\site-packages\rebulk\builder.py", line 107, in build_re
return RePattern(*pattern, **kwargs)
File "c:\python38\lib\site-packages\rebulk\pattern.py", line 441, in init
pattern = call(re.compile, pattern, **self._kwargs)
File "c:\python38\lib\site-packages\rebulk\loose.py", line 60, in call
return function(*call_args, **call_kwargs)
File "c:\python38\lib\site-packages\regex\regex.py", line 348, in compile
return _compile(pattern, flags, ignore_unused, kwargs)
File "c:\python38\lib\site-packages\regex\regex.py", line 585, in _compile
raise ValueError('unused keyword argument {!a}'.format(any_one))
ValueError: unused keyword argument 'formatter'

Please report at https://github.com/guessit-io/guessit/issues.

total: 1 success: 0 fail: 1

无法下载

anaconda 里面装的

name: Marvels.Agents.of.S.H.I.E.L.D.S01E02.1080p.WEB-DL.DD5.1.H264-PublicHD-Obfuscated.mkv
path: D:\tv\Marvel's Agents of S.H.I.E.L.D\Season 1
info: unknown error. try again.
TRACE_BACK: Traceback (most recent call last):
File "c:\users\smart\anaconda3\lib\site-packages\getsub\main.py", line 584, in start
downloader.get_subtitles(tuple(keywords))
File "c:\users\smart\anaconda3\lib\site-packages\getsub\zimuzu.py", line 46, in get_subtitles
tab_text = bs_obj.find('div', {'class': 'article-tab'}).text
AttributeError: 'NoneType' object has no attribute 'text'

zimuku下载失败

├ Peter.Rabbit.2018.1080p.BluRay.H264.AAC-RARBG.mp4
├ /home/zabyss/DLTarget/Peter.Rabbit.2018.1080p.BluRay.H264.AAC-RARBG

├ error:No connection adapters were found for 'http:http://www.subku.net/dld/103128.html'.

===============================FAILED LIST===============================

  1. name: Peter.Rabbit.2018.1080p.BluRay.H264.AAC-RARBG.mp4
    path: /home/zabyss/DLTarget/Peter.Rabbit.2018.1080p.BluRay.H264.AAC-RARBG
    info: No connection adapters were found for 'http:http://www.subku.net/dld/103128.html'.
    TRACE_BACK: Traceback (most recent call last):
    File "/usr/local/lib/python3.6/site-packages/main.py", line 438, in start
    downloader.get_subtitles(tuple(keywords))
    File "/usr/local/lib/python3.6/site-packages/zimuku.py", line 153, in get_subtitles
    r = s.get(download_link, timeout=60)
    File "/usr/local/lib/python3.6/site-packages/requests/sessions.py", line 480, in get
    return self.request('GET', url, **kwargs)
    File "/usr/local/lib/python3.6/site-packages/requests/sessions.py", line 468, in request
    resp = self.send(prep, **send_kwargs)
    File "/usr/local/lib/python3.6/site-packages/requests/sessions.py", line 570, in send
    adapter = self.get_adapter(url=request.url)
    File "/usr/local/lib/python3.6/site-packages/requests/sessions.py", line 644, in get_adapter
    raise InvalidSchema("No connection adapters were found for '%s'" % url)
    requests.exceptions.InvalidSchema: No connection adapters were found for 'http:http://www.subku.net/dld/103128.html'

total: 1 success: 0 fail: 1

匹配失败案例

getsub "G:\Movies\La.La.Land.2016.1080p.BluRay.x264.Atmos.TrueHD.7.1-HDChina\La.La.Land.2016.1080p.BluRay.x264.Atmos.TrueHD.7.1-HDChina.mkv"
no valid path specfied,download sub file to video file location.

├ La.La.Land.2016.1080p.BluRay.x264.Atmos.TrueHD.7.1-HDChina.mkv
├ G:\Movies\La.La.Land.2016.1080p.BluRay.x264.Atmos.TrueHD.7.1-HDChina

├ Get '[SUBHD]金刚:骷髅岛 / 金剛:骷髏島 / Kong.Skull.Island.2017.1080p.BluRay.x264.TrueHD.7.1.Atmos-FGT/HDChina【蓝光国语版iTunes-China】'... 100.00%
├ no matched subtitle in this archive
├ Get '[SUBHD]金刚:骷髅岛 / 金剛:骷髏島 / Kong.Skull.Island.2017.1080p.BluRay.x264.TrueHD.7.1.Atmos-FGT/HDChina【蓝光粤语版iTunes-HK】'... 100.00%
├ no matched subtitle in this archive
├ Get '[SUBHD]Alice in Wonderland | 爱丽丝梦游仙境'... 100.00%
├ no matched subtitle in this archive
├ Get '[SUBHD]地心历险记2.神秘岛Journey.2.The.Mysterious.Island.2012.720p.BluRay.x264.DTS.AC3.Dual.Audio-HDChina'... 100.00%
├ no matched subtitle in this archive
├ Get '[SUBHD]Neverland | 梦幻岛 / 永恆島'... 100.00%
├ no matched subtitle in this archive
├ error: failed to guess one subtitle,use '-q' to try query mode.add --debug to get more info of the error

===============================FAILED LIST===============================

  1. name: La.La.Land.2016.1080p.BluRay.x264.Atmos.TrueHD.7.1-HDChina.mkv
    path: G:\Movies\La.La.Land.2016.1080p.BluRay.x264.Atmos.TrueHD.7.1-HDChina
    info: failed to guess one subtitle,use '-q' to try query mode.add --debug to get more info of the error

total: 1 success: 0 fail: 1

显示报错

  1. name: Paddington.2(2017).mkv
    path: X:\影视\电影(8.2分)-帕丁顿熊2(2017)
    info: No connection adapters were found for 'http:http://www.subku.net/dld/103695.html'.
    TRACE_BACK: Traceback (most recent call last):
    File "C:\Python\Scripts\main.py", line 438, in start
    downloader.get_subtitles(tuple(keywords))
    File "C:\Python\Scripts\zimuku.py", line 153, in get_subtitles
    r = s.get(download_link, timeout=60)
    File "c:\python\lib\site-packages\requests\sessions.py", line 521, in get
    return self.request('GET', url, **kwargs)
    File "c:\python\lib\site-packages\requests\sessions.py", line 508, in request
    resp = self.send(prep, **send_kwargs)
    File "c:\python\lib\site-packages\requests\sessions.py", line 612, in send
    adapter = self.get_adapter(url=request.url)
    File "c:\python\lib\site-packages\requests\sessions.py", line 703, in get_adapter
    raise InvalidSchema("No connection adapters were found for '%s'" % url)
    requests.exceptions.InvalidSchema: No connection adapters were found for 'http:http://www.subku.net/dld/103695.html'

问题应该出在两个http:但是我不知道怎么改。麻烦大大指教

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.