Diaoul / subliminal

Subtitles, faster than your thoughts
http://subliminal.readthedocs.org
MIT License
2.41k stars 313 forks source link

SSL error #1039

Closed peteythepanda closed 5 months ago

peteythepanda commented 3 years ago

command:

subliminal download -l en The.Big.Bang.Theory.S05E18.HDTV.x264-LOL.mp4

output:

`C:\Users\user>subliminal --debug download -l en The.Big.Bang.Theory.S05E18.HDTV.x264-LOL.mp4
Collecting videos  [------------------------------------]    0%  The.Big.Bang.Theory.S05E18.HDTV.x264-LOL.mp4DEBUG:subliminal.cli:Collecting path The.Big.Bang.Theory.S05E18.HDTV.x264-LOL.mp4
DEBUG:subliminal.core:Found subtitles {}
INFO:subliminal.core:Refining video with hash
ERROR:subliminal.utils:Unexpected error. Failed to refine video 'The.Big.Bang.Theory.S05E18.HDTV.x264-LOL.mp4'
Traceback (most recent call last):
  File "C:\Users\user\AppData\Local\Programs\Python\Python310\lib\site-packages\subliminal\core.py", line 549, in refine
    refiner_manager[refiner].plugin(video, **dict((refiner_configs or {}).get(refiner, {}), **kwargs))
  File "C:\Users\user\AppData\Local\Programs\Python\Python310\lib\site-packages\subliminal\refiners\hash.py", line 26, in refine
    if video.size <= 10485760:
TypeError: '<=' not supported between instances of 'NoneType' and 'int'
INFO:subliminal.core:Refining video with metadata
INFO:subliminal.core:Refining video with tvdb
INFO:subliminal.refiners.tvdb:Searching series 'The Big Bang Theory'
DEBUG:subliminal.refiners.tvdb:Found 1 results
DEBUG:subliminal.refiners.tvdb:Found exact match on series 'The Big Bang Theory'
DEBUG:subliminal.refiners.tvdb:Found series {'id': 80379, 'seriesId': '58053', 'seriesName': 'The Big Bang Theory', 'aliases': [], 'season': '12', 'poster': 'posters/80379-18.jpg', 'banner': 'graphical/80379-g13.jpg', 'fanart': 'fanart/original/80379-2.jpg', 'status': 'Ended', 'firstAired': '2007-09-24', 'network': 'CBS', 'networkId': '57', 'runtime': '25', 'language': 'en', 'genre': ['Comedy'], 'overview': 'A woman who moves into an apartment across the hall from two brilliant but socially awkward physicists shows them how little they know about life outside of the laboratory.', 'lastUpdated': 1629785794, 'airsDayOfWeek': 'Thursday', 'airsTime': '8:00 PM', 'rating': 'TV-14', 'imdbId': 'tt0898266', 'zap2itId': 'EP00931182', 'added': '2008-02-04 00:00:00', 'addedBy': 1, 'siteRating': 8.8, 'siteRatingCount': 41886, 'slug': 'the-big-bang-theory'}
INFO:subliminal.refiners.tvdb:Getting series episode 5x18
DEBUG:subliminal.refiners.tvdb:Found episode {'id': 4261649, 'airedSeason': 5, 'airedSeasonID': 468774, 'airedEpisodeNumber': 18, 'episodeName': 'The Werewolf Transformation', 'firstAired': '2012-02-23', 'guestStars': ['Peter Onorati', 'Vernee Watson'], 'directors': ['Mark Cendrowski'], 'writers': ['Bill Prady', 'Jim Reynolds', 'Maria Ferrari', 'Steven Molaro'], 'overview': 'Sheldon becomes agitated when his regular barber is out sick. Astronaut training causes Howard to reconsider wanting to go into space. Penny beats Leonard in chess, the first time she plays.', 'language': {'episodeName': 'en', 'overview': 'en'}, 'productionCode': '3X6868', 'showUrl': '', 'lastUpdated': 1592062060, 'dvdDiscid': '', 'dvdSeason': 5, 'dvdEpisodeNumber': 18, 'dvdChapter': None, 'absoluteNumber': 105, 'filename': 'series/80379/episodes/5eb1e0579354c.jpg', 'seriesId': 80379, 'lastUpdatedBy': 198416, 'airsAfterSeason': None, 'airsBeforeSeason': None, 'airsBeforeEpisode': None, 'imdbId': 'tt2238153', 'contentRating': 'TV-14', 'thumbAuthor': 198416, 'thumbAdded': '2020-05-05 21:53:26', 'thumbWidth': '640', 'thumbHeight': '360', 'siteRating': 7.8, 'siteRatingCount': 8802, 'isMovie': 0}
INFO:subliminal.core:Refining video with omdb
WARNING:subliminal.refiners.omdb:No apikey. Skipping omdb refiner.
Collecting videos  [####################################]  100%
1 video collected / 0 video ignored / 0 error
Downloading subtitles  [------------------------------------]    0%  The.Big.Bang.Theory.S05E18.HDTV.x264-LOL.mp4INFO:subliminal.core:Skipping provider 'argenteam': no language to search for
INFO:subliminal.core:Listing subtitles with provider 'legendastv' and languages {<Language [en]>}
INFO:subliminal.core:Initializing provider legendastv
INFO:subliminal.core:Listing subtitles with provider 'opensubtitles' and languages {<Language [en]>}
ERROR:subliminal.utils:Unexpected error. Provider legendastv
Traceback (most recent call last):
  File "C:\Users\user\AppData\Local\Programs\Python\Python310\lib\site-packages\subliminal\core.py", line 115, in list_subtitles_provider
    return self[provider].list_subtitles(video, provider_languages)
  File "C:\Users\user\AppData\Local\Programs\Python\Python310\lib\site-packages\subliminal\core.py", line 66, in __getitem__
    provider = provider_manager[name].plugin(**self.provider_configs.get(name, {}))
  File "C:\Users\user\AppData\Local\Programs\Python\Python310\lib\site-packages\subliminal\providers\legendastv.py", line 164, in __init__
    rarfile.custom_check([rarfile.UNRAR_TOOL], True)
AttributeError: module 'rarfile' has no attribute 'custom_check'
INFO:subliminal.core:Listing subtitles with provider 'podnapisi' and languages {<Language [en]>}
INFO:subliminal.core:Initializing provider opensubtitles
INFO:subliminal.core:Listing subtitles with provider 'shooter' and languages {<Language [en]>}
INFO:subliminal.core:Skipping provider 'thesubdb': not a valid video
INFO:subliminal.core:Discarding provider legendastv
INFO:subliminal.core:Initializing provider podnapisi
INFO:subliminal.core:Listing subtitles with provider 'tvsubtitles' and languages {<Language [en]>}
INFO:subliminal.providers.opensubtitles:Logging in
INFO:subliminal.core:Initializing provider shooter
INFO:subliminal.providers.podnapisi:Searching subtitles {'sXML': 1, 'sL': 'en', 'sK': 'The Big Bang Theory', 'sTS': 5, 'sTE': 18, 'sY': 2007}
INFO:subliminal.core:Initializing provider tvsubtitles
DEBUG:subliminal.providers.shooter:Searching subtitles {'filehash': None, 'pathinfo': 'C:\\Users\\user\\The.Big.Bang.Theory.S05E18.HDTV.x264-LOL.mp4', 'format': 'json', 'lang': 'eng'}
INFO:subliminal.providers.tvsubtitles:Searching show id for 'The Big Bang Theory'
ERROR:subliminal.utils:SSL error MaxRetryError("HTTPSConnectionPool(host='www.podnapisi.net', port=443): Max retries exceeded with url: /subtitles/search/old?sXML=1&sL=en&sK=The+Big+Bang+Theory&sTS=5&sTE=18&sY=2007 (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:997)')))"). Provider podnapisi
Traceback (most recent call last):
  File "C:\Users\user\AppData\Local\Programs\Python\Python310\lib\site-packages\urllib3\connectionpool.py", line 699, in urlopen
    httplib_response = self._make_request(
  File "C:\Users\user\AppData\Local\Programs\Python\Python310\lib\site-packages\urllib3\connectionpool.py", line 382, in _make_request
    self._validate_conn(conn)
  File "C:\Users\user\AppData\Local\Programs\Python\Python310\lib\site-packages\urllib3\connectionpool.py", line 1010, in _validate_conn
    conn.connect()
  File "C:\Users\user\AppData\Local\Programs\Python\Python310\lib\site-packages\urllib3\connection.py", line 416, in connect
    self.sock = ssl_wrap_socket(
  File "C:\Users\user\AppData\Local\Programs\Python\Python310\lib\site-packages\urllib3\util\ssl_.py", line 449, in ssl_wrap_socket
    ssl_sock = _ssl_wrap_socket_impl(
  File "C:\Users\user\AppData\Local\Programs\Python\Python310\lib\site-packages\urllib3\util\ssl_.py", line 493, in _ssl_wrap_socket_impl
    return ssl_context.wrap_socket(sock, server_hostname=server_hostname)
  File "C:\Users\user\AppData\Local\Programs\Python\Python310\lib\ssl.py", line 512, in wrap_socket
    return self.sslsocket_class._create(
  File "C:\Users\user\AppData\Local\Programs\Python\Python310\lib\ssl.py", line 1070, in _create
    self.do_handshake()
  File "C:\Users\user\AppData\Local\Programs\Python\Python310\lib\ssl.py", line 1341, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:997)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\user\AppData\Local\Programs\Python\Python310\lib\site-packages\requests\adapters.py", line 439, in send
    resp = conn.urlopen(
  File "C:\Users\user\AppData\Local\Programs\Python\Python310\lib\site-packages\urllib3\connectionpool.py", line 755, in urlopen
    retries = retries.increment(
  File "C:\Users\user\AppData\Local\Programs\Python\Python310\lib\site-packages\urllib3\util\retry.py", line 574, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='www.podnapisi.net', port=443): Max retries exceeded with url: /subtitles/search/old?sXML=1&sL=en&sK=The+Big+Bang+Theory&sTS=5&sTE=18&sY=2007 (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:997)')))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\user\AppData\Local\Programs\Python\Python310\lib\site-packages\subliminal\core.py", line 115, in list_subtitles_provider
    return self[provider].list_subtitles(video, provider_languages)
  File "C:\Users\user\AppData\Local\Programs\Python\Python310\lib\site-packages\subliminal\providers\podnapisi.py", line 160, in list_subtitles
    subtitles = [s for l in languages for s in
  File "C:\Users\user\AppData\Local\Programs\Python\Python310\lib\site-packages\subliminal\providers\podnapisi.py", line 161, in <listcomp>
    self.query(l, title, season=season, episode=episode, year=video.year)]
  File "C:\Users\user\AppData\Local\Programs\Python\Python310\lib\site-packages\subliminal\providers\podnapisi.py", line 98, in query
    r = self.session.get(self.server_url + 'search/old', params=params, timeout=10)
  File "C:\Users\user\AppData\Local\Programs\Python\Python310\lib\site-packages\requests\sessions.py", line 555, in get
    return self.request('GET', url, **kwargs)
  File "C:\Users\user\AppData\Local\Programs\Python\Python310\lib\site-packages\requests\sessions.py", line 542, in request
    resp = self.send(prep, **send_kwargs)
  File "C:\Users\user\AppData\Local\Programs\Python\Python310\lib\site-packages\requests\sessions.py", line 655, in send
    r = adapter.send(request, **kwargs)
  File "C:\Users\user\AppData\Local\Programs\Python\Python310\lib\site-packages\requests\adapters.py", line 514, in send
    raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='www.podnapisi.net', port=443): Max retries exceeded with url: /subtitles/search/old?sXML=1&sL=en&sK=The+Big+Bang+Theory&sTS=5&sTE=18&sY=2007 (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:997)')))
ERROR:subliminal.utils:Unexpected error. Provider opensubtitles
Traceback (most recent call last):
  File "C:\Users\user\AppData\Local\Programs\Python\Python310\lib\site-packages\subliminal\core.py", line 115, in list_subtitles_provider
    return self[provider].list_subtitles(video, provider_languages)
  File "C:\Users\user\AppData\Local\Programs\Python\Python310\lib\site-packages\subliminal\core.py", line 67, in __getitem__
    provider.initialize()
  File "C:\Users\user\AppData\Local\Programs\Python\Python310\lib\site-packages\subliminal\providers\opensubtitles.py", line 129, in initialize
    response = checked(self.server.LogIn(self.username, self.password, 'eng', self.user_agent))
  File "C:\Users\user\AppData\Local\Programs\Python\Python310\lib\site-packages\subliminal\providers\opensubtitles.py", line 278, in checked
    raise Unauthorized
subliminal.providers.opensubtitles.Unauthorized
INFO:subliminal.core:Discarding provider opensubtitles
INFO:subliminal.core:Discarding provider podnapisi
DEBUG:subliminal.providers.tvsubtitles:Found show id 154
INFO:subliminal.providers.tvsubtitles:Getting the page of show id 154, season 5
DEBUG:subliminal.providers.tvsubtitles:Found episode ids {24: 38687, 23: 38686, 22: 38574, 21: 38218, 20: 37863, 19: 37407, 18: 37153, 17: 37152, 16: 36795, 15: 36718, 14: 36610, 13: 36513, 12: 36369, 11: 35887, 10: 35503, 9: 35436, 8: 35023, 7: 35022, 6: 34923, 5: 34849, 4: 34277, 3: 34276, 2: 34275, 1: 34274}
INFO:subliminal.providers.tvsubtitles:Getting the page for episode 37153
DEBUG:subliminal.providers.tvsubtitles:Found subtitle <TVsubtitlesSubtitle '206769' [en]>
DEBUG:subliminal.providers.tvsubtitles:Found subtitle <TVsubtitlesSubtitle '207364' [en]>
DEBUG:subliminal.providers.tvsubtitles:Found subtitle <TVsubtitlesSubtitle '237563' [es]>
DEBUG:subliminal.providers.tvsubtitles:Found subtitle <TVsubtitlesSubtitle '207341' [fr]>
DEBUG:subliminal.providers.tvsubtitles:Found subtitle <TVsubtitlesSubtitle '207339' [fr]>
DEBUG:subliminal.providers.tvsubtitles:Found subtitle <TVsubtitlesSubtitle '207361' [fr]>
DEBUG:subliminal.providers.tvsubtitles:Found subtitle <TVsubtitlesSubtitle '207430' [fr]>
DEBUG:subliminal.providers.tvsubtitles:Found subtitle <TVsubtitlesSubtitle '208323' [fr]>
DEBUG:subliminal.providers.tvsubtitles:Found subtitle <TVsubtitlesSubtitle '208632' [fr]>
DEBUG:subliminal.providers.tvsubtitles:Found subtitle <TVsubtitlesSubtitle '207373' [pt-BR]>
DEBUG:subliminal.providers.tvsubtitles:Found subtitle <TVsubtitlesSubtitle '207374' [pt-BR]>
DEBUG:subliminal.providers.tvsubtitles:Found subtitle <TVsubtitlesSubtitle '207375' [pt-BR]>
DEBUG:subliminal.providers.tvsubtitles:Found subtitle <TVsubtitlesSubtitle '207625' [ru]>
DEBUG:subliminal.providers.tvsubtitles:Found subtitle <TVsubtitlesSubtitle '207636' [ru]>
DEBUG:subliminal.providers.tvsubtitles:Found subtitle <TVsubtitlesSubtitle '207807' [ru]>
DEBUG:subliminal.providers.tvsubtitles:Found subtitle <TVsubtitlesSubtitle '209875' [ru]>
DEBUG:subliminal.providers.tvsubtitles:Found subtitle <TVsubtitlesSubtitle '207963' [el]>
DEBUG:subliminal.providers.tvsubtitles:Found subtitle <TVsubtitlesSubtitle '208834' [el]>
DEBUG:subliminal.providers.tvsubtitles:Found subtitle <TVsubtitlesSubtitle '208835' [el]>
DEBUG:subliminal.providers.tvsubtitles:Found subtitle <TVsubtitlesSubtitle '226759' [el]>
DEBUG:subliminal.providers.tvsubtitles:Found subtitle <TVsubtitlesSubtitle '207429' [hu]>
DEBUG:subliminal.providers.tvsubtitles:Found subtitle <TVsubtitlesSubtitle '207766' [pt]>
DEBUG:subliminal.providers.tvsubtitles:Found subtitle <TVsubtitlesSubtitle '207359' [sv]>
DEBUG:subliminal.providers.tvsubtitles:Found subtitle <TVsubtitlesSubtitle '212975' [ro]>
DEBUG:subliminal.providers.shooter:No subtitles found
INFO:subliminal.score:Computing score of <TVsubtitlesSubtitle '206769' [en]> for video <Episode [The Big Bang Theory2007 s05e18]> with {'hearing_impaired': False}
DEBUG:subliminal.score:Using scores {'hash': 809, 'series': 405, 'year': 135, 'country': 135, 'season': 45, 'episode': 45, 'release_group': 15, 'streaming_service': 15, 'source': 7, 'audio_codec': 3, 'resolution': 2, 'video_codec': 2, 'hearing_impaired': 1}
DEBUG:subliminal.score:Found matches {'series', 'year', 'episode', 'season', 'country', 'source'}
DEBUG:subliminal.score:Matched hearing_impaired
INFO:subliminal.score:Computed score 773 with final matches {'series', 'year', 'episode', 'season', 'hearing_impaired', 'country', 'source'}
INFO:subliminal.score:Computing score of <TVsubtitlesSubtitle '207364' [en]> for video <Episode [The Big Bang Theory2007 s05e18]> with {'hearing_impaired': False}
DEBUG:subliminal.score:Using scores {'hash': 809, 'series': 405, 'year': 135, 'country': 135, 'season': 45, 'episode': 45, 'release_group': 15, 'streaming_service': 15, 'source': 7, 'audio_codec': 3, 'resolution': 2, 'video_codec': 2, 'hearing_impaired': 1}
DEBUG:subliminal.score:Found matches {'series', 'year', 'episode', 'season', 'country', 'release_group', 'source'}
DEBUG:subliminal.score:Matched hearing_impaired
INFO:subliminal.score:Computed score 788 with final matches {'series', 'year', 'episode', 'season', 'hearing_impaired', 'country', 'release_group', 'source'}
INFO:subliminal.core:Downloading subtitle <TVsubtitlesSubtitle '207364' [en]>
INFO:subliminal.providers.tvsubtitles:Downloading subtitle <TVsubtitlesSubtitle '207364' [en]>
ERROR:subliminal.core:Bad archive for subtitle <TVsubtitlesSubtitle '207364' [en]>
ERROR:subliminal.core:Invalid subtitle
INFO:subliminal.core:Downloading subtitle <TVsubtitlesSubtitle '206769' [en]>
INFO:subliminal.providers.tvsubtitles:Downloading subtitle <TVsubtitlesSubtitle '206769' [en]>
ERROR:subliminal.core:Bad archive for subtitle <TVsubtitlesSubtitle '206769' [en]>
ERROR:subliminal.core:Invalid subtitle
Downloading subtitles  [####################################]  100%
Some providers have been discarded due to unexpected errors: podnapisi, legendastv, opensubtitles
DEBUG:subliminal.core:Terminating initialized providers
INFO:subliminal.core:Terminating provider podnapisi
INFO:subliminal.core:Terminating provider shooter
INFO:subliminal.core:Terminating provider tvsubtitles
Downloaded 0 subtitle`

How do I make it work?

Fischchen commented 1 year ago

same issue

stingwraith commented 1 year ago

Same here. I really wish there was an easy way to disable SSL. I've tried the suggested workarounds in other threads, but SSL is still in my way.

MasterMind2k commented 10 months ago

SSL issue on Podnapisi.NET site is resolved.