1SUBLIMINAL(1)                     subliminal                     SUBLIMINAL(1)
2
3
4

NAME

6       subliminal - subliminal Documentation
7
8       Subliminal  is  a python 2.7+ library to search and download subtitles.
9       It comes with an easy to use yet powerful CLI suitable for  direct  use
10       or cron jobs.
11

DOCUMENTATION

13   Usage
14   CLI
15       Download English subtitles:
16
17          $ subliminal download -l en The.Big.Bang.Theory.S05E18.HDTV.x264-LOL.mp4
18          Collecting videos  [####################################]  100%
19          1 video collected / 0 video ignored
20          Downloading subtitles  [####################################]  100%
21          Downloaded 1 subtitle
22
23       WARNING:
24          For  cron  usage, make sure to specify a maximum age (with --age) so
25          subtitles are searched for recent videos only.  Otherwise  you  will
26          get banned from the providers for abuse due to too many requests. If
27          subliminal didn’t find subtitles for an old video, it’s unlikely  it
28          will find subtitles for that video ever anyway.
29
30       See CLI for more details on the available commands and options.
31
32   Nautilus/Nemo integration
33       See the dedicated project page for more information.
34
35   High level API
36       You  can  call  subliminal in many different ways depending on how much
37       control you want over the process. For most use cases, you can stick to
38       the standard API.
39
40   Common
41       Let’s start by importing subliminal:
42
43       >>> import os
44       >>> from babelfish import *
45       >>> from subliminal import *
46
47       Before going further, there are a few things to know about subliminal.
48
49   Video
50       The  Movie  and Episode classes represent a video, existing or not. You
51       can  create  a  video  by  name  (or  path)  with  Video.fromname,  use
52       scan_video()  on  an  existing  file  path to get even more information
53       about the video or use scan_videos() on an existing directory  path  to
54       scan a whole directory for videos.
55
56       >>> video = Video.fromname('The.Big.Bang.Theory.S05E18.HDTV.x264-LOL.mp4')
57       >>> video
58       <Episode [The Big Bang Theory s05e18]>
59
60       Here  video information was guessed based on the name of the video, you
61       can access some video attributes:
62
63       >>> video.video_codec
64       'H.264'
65       >>> video.release_group
66       'LOL'
67
68   Configuration
69       Before proceeding to listing and downloading  subtitles,  you  need  to
70       configure the cache. Subliminal uses a cache to reduce repeated queries
71       to providers and improve overall performance with no impact  on  search
72       quality.  For  the  sake  of  this example, we’re going to use a memory
73       backend.
74
75       >>> my_region = region.configure('dogpile.cache.memory')
76
77       WARNING:
78          Choose a cache that fits your application and prefer persistent over
79          volatile  backends.  The file backend is usually a good choice.  See
80          dogpile.cache’s documentation for more details on backends.
81
82       Now that we’re done with the basics, let’s have some real fun.
83
84   Listing
85       To list subtitles, subliminal provides a list_subtitles() function that
86       will return all found subtitles:
87
88       >>> subtitles = list_subtitles([video], {Language('hun')}, providers=['podnapisi'])
89       >>> subtitles[video]
90       [<PodnapisiSubtitle 'ZtAW' [hu]>, <PodnapisiSubtitle 'ONAW' [hu]>]
91
92       NOTE:
93          As  you  noticed,  all parameters are iterables but only contain one
94          item which means you can deal with a lot of  videos,  languages  and
95          providers  at the same time. For the sake of this example, we filter
96          providers to use only one, pass providers=None (default)  to  search
97          on all providers.
98
99   Scoring
100       It’s  usual  you  have  multiple  candidates for subtitles. To help you
101       chose which one to download, subliminal can compare them to  the  video
102       and tell you exactly what matches with get_matches():
103
104       >>> for s in subtitles[video]:
105       ...     sorted(s.get_matches(video))
106       ['country', 'episode', 'release_group', 'season', 'series', 'source', 'video_codec', 'year']
107       ['country', 'episode', 'season', 'series', 'source', 'year']
108
109       And then compute a score with those matches with compute_score():
110
111       >>> for s in subtitles[video]:
112       ...     {s: compute_score(s, video)}
113       {<PodnapisiSubtitle 'ZtAW' [hu]>: 789}
114       {<PodnapisiSubtitle 'ONAW' [hu]>: 772}
115
116       Now you should have a better idea about which one you should choose.
117
118   Downloading
119       We  can  settle  on  the  first subtitle and download its content using
120       download_subtitles():
121
122       >>> subtitle = subtitles[video][0]
123       >>> subtitle.content is None
124       True
125       >>> download_subtitles([subtitle])
126       >>> subtitle.content.split(b'\n')[2]
127       b'Elszaladok a boltba'
128
129       If you want a string instead of bytes, you can access  decoded  content
130       with the text property:
131
132       >>> subtitle.text.split('\n')[3]
133       'néhány apróságért.'
134
135   Downloading best subtitles
136       Downloading  best subtitles is what you want to do in almost all cases,
137       as a shortcut for listing, scoring and downloading you  can  use  down‐
138       load_best_subtitles():
139
140       >>> best_subtitles = download_best_subtitles([video], {Language('hun')}, providers=['podnapisi'])
141       >>> best_subtitles[video]
142       [<PodnapisiSubtitle 'ZtAW' [hu]>]
143       >>> best_subtitle = best_subtitles[video][0]
144       >>> best_subtitle.content.split(b'\n')[2]
145       b'Elszaladok a boltba'
146
147       We end up with the same subtitle but with one line of code. Neat.
148
149   Save
150       We got ourselves a nice subtitle, now we can save it on the file system
151       using save_subtitles():
152
153       >>> save_subtitles(video, [best_subtitle])
154       [<PodnapisiSubtitle 'ZtAW' [hu]>]
155       >>> os.listdir()
156       ['The.Big.Bang.Theory.S05E18.HDTV.x264-LOL.hu.srt']
157
158   How it works
159   Providers
160       Subliminal uses multiple providers to give users a vast choice and have
161       a  better chance to find the best matching subtitles. Current supported
162       providers are:
163
164       • Addic7ed
165
166       • LegendasTV
167
168       • NapiProjekt
169
170       • OpenSubtitles
171
172       • Podnapisi
173
174       • Shooter
175
176       • TheSubDB
177
178       • TvSubtitles
179
180       Providers all inherit the same Provider base class and thus  share  the
181       same  API.  They are registered on the subliminal.providers entry point
182       and are exposed through the provider_manager for easy access.
183
184       To work with multiple providers seamlessly,  the  ProviderPool  exposes
185       the  same API but distributes it to its providers and AsyncProviderPool
186       does it asynchronously.
187
188   Scoring
189       Rating subtitles and comparing them is probably the most difficult part
190       and  this  is  where  subliminal excels with its powerful scoring algo‐
191       rithm.
192
193       Using guessit and enzyme, subliminal extracts properties of  the  video
194       and  match  them  with  the  properties of the subtitles found with the
195       providers.
196
197       Equations in subliminal.score give a score to each property  (called  a
198       match).  The  more  matches the video and the subtitle have, the higher
199       the score computed with compute_score() gets.
200
201   Libraries
202       Various libraries are used by subliminal and are key to its success:
203
204guessit to guess information from filenames
205
206enzyme to detect embedded subtitles in videos and  read  other  video
207         metadata
208
209babelfish to work with languages
210
211requests to make human readable HTTP requests
212
213BeautifulSoup to parse HTML and XML
214
215dogpile.cache to cache intermediate search results
216
217stevedore to manage the provider entry point
218
219chardet to detect subtitles’ encoding
220
221pysrt to validate downloaded subtitles
222
223   CLI
224   subliminal
225          Traceback (most recent call last):
226            File "/builddir/build/BUILDROOT/python-subliminal-2.1.0-13.fc39.noarch/usr/bin/subliminal", line 33, in <module>
227              sys.exit(load_entry_point('subliminal==2.1.0', 'console_scripts', 'subliminal')())
228                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
229            File "/builddir/build/BUILDROOT/python-subliminal-2.1.0-13.fc39.noarch/usr/bin/subliminal", line 25, in importlib_load_entry_point
230              return next(matches).load()
231                     ^^^^^^^^^^^^^^^^^^^^
232            File "/usr/lib64/python3.12/importlib/metadata/__init__.py", line 205, in load
233              module = import_module(match.group('module'))
234                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
235            File "/usr/lib64/python3.12/importlib/__init__.py", line 90, in import_module
236              return _bootstrap._gcd_import(name[level:], package, level)
237                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
238            File "<frozen importlib._bootstrap>", line 1293, in _gcd_import
239            File "<frozen importlib._bootstrap>", line 1266, in _find_and_load
240            File "<frozen importlib._bootstrap>", line 1216, in _find_and_load_unlocked
241            File "<frozen importlib._bootstrap>", line 400, in _call_with_frames_removed
242            File "<frozen importlib._bootstrap>", line 1293, in _gcd_import
243            File "<frozen importlib._bootstrap>", line 1266, in _find_and_load
244            File "<frozen importlib._bootstrap>", line 1237, in _find_and_load_unlocked
245            File "<frozen importlib._bootstrap>", line 841, in _load_unlocked
246            File "<frozen importlib._bootstrap_external>", line 994, in exec_module
247            File "<frozen importlib._bootstrap>", line 400, in _call_with_frames_removed
248            File "/builddir/build/BUILDROOT/python-subliminal-2.1.0-13.fc39.noarch/usr/lib/python3.12/site-packages/subliminal/__init__.py", line 11, in <module>
249              from .core import (AsyncProviderPool, ProviderPool, check_video, download_best_subtitles, download_subtitles,
250            File "/builddir/build/BUILDROOT/python-subliminal-2.1.0-13.fc39.noarch/usr/lib/python3.12/site-packages/subliminal/core.py", line 11, in <module>
251              from babelfish import Language, LanguageReverseError
252            File "/usr/lib/python3.12/site-packages/babelfish/__init__.py", line 14, in <module>
253              from .converters import (LanguageConverter, LanguageReverseConverter, LanguageEquivalenceConverter, CountryConverter,
254            File "/usr/lib/python3.12/site-packages/babelfish/converters/__init__.py", line 5, in <module>
255              from pkg_resources import iter_entry_points, EntryPoint
256            File "/usr/lib/python3.12/site-packages/pkg_resources/__init__.py", line 3326, in <module>
257              @_call_aside
258               ^^^^^^^^^^^
259            File "/usr/lib/python3.12/site-packages/pkg_resources/__init__.py", line 3301, in _call_aside
260              f(*args, **kwargs)
261            File "/usr/lib/python3.12/site-packages/pkg_resources/__init__.py", line 3339, in _initialize_master_working_set
262              working_set = WorkingSet._build_master()
263                            ^^^^^^^^^^^^^^^^^^^^^^^^^^
264            File "/usr/lib/python3.12/site-packages/pkg_resources/__init__.py", line 629, in _build_master
265              ws.require(__requires__)
266            File "/usr/lib/python3.12/site-packages/pkg_resources/__init__.py", line 966, in require
267              needed = self.resolve(parse_requirements(requirements))
268                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
269            File "/usr/lib/python3.12/site-packages/pkg_resources/__init__.py", line 827, in resolve
270              dist = self._resolve_dist(
271                     ^^^^^^^^^^^^^^^^^^^
272            File "/usr/lib/python3.12/site-packages/pkg_resources/__init__.py", line 868, in _resolve_dist
273              raise DistributionNotFound(req, requirers)
274          pkg_resources.DistributionNotFound: The 'pytz>=2012c' distribution was not found and is required by subliminal
275
276   subliminal download
277          Traceback (most recent call last):
278            File "/builddir/build/BUILDROOT/python-subliminal-2.1.0-13.fc39.noarch/usr/bin/subliminal", line 33, in <module>
279              sys.exit(load_entry_point('subliminal==2.1.0', 'console_scripts', 'subliminal')())
280                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
281            File "/builddir/build/BUILDROOT/python-subliminal-2.1.0-13.fc39.noarch/usr/bin/subliminal", line 25, in importlib_load_entry_point
282              return next(matches).load()
283                     ^^^^^^^^^^^^^^^^^^^^
284            File "/usr/lib64/python3.12/importlib/metadata/__init__.py", line 205, in load
285              module = import_module(match.group('module'))
286                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
287            File "/usr/lib64/python3.12/importlib/__init__.py", line 90, in import_module
288              return _bootstrap._gcd_import(name[level:], package, level)
289                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
290            File "<frozen importlib._bootstrap>", line 1293, in _gcd_import
291            File "<frozen importlib._bootstrap>", line 1266, in _find_and_load
292            File "<frozen importlib._bootstrap>", line 1216, in _find_and_load_unlocked
293            File "<frozen importlib._bootstrap>", line 400, in _call_with_frames_removed
294            File "<frozen importlib._bootstrap>", line 1293, in _gcd_import
295            File "<frozen importlib._bootstrap>", line 1266, in _find_and_load
296            File "<frozen importlib._bootstrap>", line 1237, in _find_and_load_unlocked
297            File "<frozen importlib._bootstrap>", line 841, in _load_unlocked
298            File "<frozen importlib._bootstrap_external>", line 994, in exec_module
299            File "<frozen importlib._bootstrap>", line 400, in _call_with_frames_removed
300            File "/builddir/build/BUILDROOT/python-subliminal-2.1.0-13.fc39.noarch/usr/lib/python3.12/site-packages/subliminal/__init__.py", line 11, in <module>
301              from .core import (AsyncProviderPool, ProviderPool, check_video, download_best_subtitles, download_subtitles,
302            File "/builddir/build/BUILDROOT/python-subliminal-2.1.0-13.fc39.noarch/usr/lib/python3.12/site-packages/subliminal/core.py", line 11, in <module>
303              from babelfish import Language, LanguageReverseError
304            File "/usr/lib/python3.12/site-packages/babelfish/__init__.py", line 14, in <module>
305              from .converters import (LanguageConverter, LanguageReverseConverter, LanguageEquivalenceConverter, CountryConverter,
306            File "/usr/lib/python3.12/site-packages/babelfish/converters/__init__.py", line 5, in <module>
307              from pkg_resources import iter_entry_points, EntryPoint
308            File "/usr/lib/python3.12/site-packages/pkg_resources/__init__.py", line 3326, in <module>
309              @_call_aside
310               ^^^^^^^^^^^
311            File "/usr/lib/python3.12/site-packages/pkg_resources/__init__.py", line 3301, in _call_aside
312              f(*args, **kwargs)
313            File "/usr/lib/python3.12/site-packages/pkg_resources/__init__.py", line 3339, in _initialize_master_working_set
314              working_set = WorkingSet._build_master()
315                            ^^^^^^^^^^^^^^^^^^^^^^^^^^
316            File "/usr/lib/python3.12/site-packages/pkg_resources/__init__.py", line 629, in _build_master
317              ws.require(__requires__)
318            File "/usr/lib/python3.12/site-packages/pkg_resources/__init__.py", line 966, in require
319              needed = self.resolve(parse_requirements(requirements))
320                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
321            File "/usr/lib/python3.12/site-packages/pkg_resources/__init__.py", line 827, in resolve
322              dist = self._resolve_dist(
323                     ^^^^^^^^^^^^^^^^^^^
324            File "/usr/lib/python3.12/site-packages/pkg_resources/__init__.py", line 868, in _resolve_dist
325              raise DistributionNotFound(req, requirers)
326          pkg_resources.DistributionNotFound: The 'pytz>=2012c' distribution was not found and is required by subliminal
327
328   subliminal cache
329          Traceback (most recent call last):
330            File "/builddir/build/BUILDROOT/python-subliminal-2.1.0-13.fc39.noarch/usr/bin/subliminal", line 33, in <module>
331              sys.exit(load_entry_point('subliminal==2.1.0', 'console_scripts', 'subliminal')())
332                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
333            File "/builddir/build/BUILDROOT/python-subliminal-2.1.0-13.fc39.noarch/usr/bin/subliminal", line 25, in importlib_load_entry_point
334              return next(matches).load()
335                     ^^^^^^^^^^^^^^^^^^^^
336            File "/usr/lib64/python3.12/importlib/metadata/__init__.py", line 205, in load
337              module = import_module(match.group('module'))
338                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
339            File "/usr/lib64/python3.12/importlib/__init__.py", line 90, in import_module
340              return _bootstrap._gcd_import(name[level:], package, level)
341                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
342            File "<frozen importlib._bootstrap>", line 1293, in _gcd_import
343            File "<frozen importlib._bootstrap>", line 1266, in _find_and_load
344            File "<frozen importlib._bootstrap>", line 1216, in _find_and_load_unlocked
345            File "<frozen importlib._bootstrap>", line 400, in _call_with_frames_removed
346            File "<frozen importlib._bootstrap>", line 1293, in _gcd_import
347            File "<frozen importlib._bootstrap>", line 1266, in _find_and_load
348            File "<frozen importlib._bootstrap>", line 1237, in _find_and_load_unlocked
349            File "<frozen importlib._bootstrap>", line 841, in _load_unlocked
350            File "<frozen importlib._bootstrap_external>", line 994, in exec_module
351            File "<frozen importlib._bootstrap>", line 400, in _call_with_frames_removed
352            File "/builddir/build/BUILDROOT/python-subliminal-2.1.0-13.fc39.noarch/usr/lib/python3.12/site-packages/subliminal/__init__.py", line 11, in <module>
353              from .core import (AsyncProviderPool, ProviderPool, check_video, download_best_subtitles, download_subtitles,
354            File "/builddir/build/BUILDROOT/python-subliminal-2.1.0-13.fc39.noarch/usr/lib/python3.12/site-packages/subliminal/core.py", line 11, in <module>
355              from babelfish import Language, LanguageReverseError
356            File "/usr/lib/python3.12/site-packages/babelfish/__init__.py", line 14, in <module>
357              from .converters import (LanguageConverter, LanguageReverseConverter, LanguageEquivalenceConverter, CountryConverter,
358            File "/usr/lib/python3.12/site-packages/babelfish/converters/__init__.py", line 5, in <module>
359              from pkg_resources import iter_entry_points, EntryPoint
360            File "/usr/lib/python3.12/site-packages/pkg_resources/__init__.py", line 3326, in <module>
361              @_call_aside
362               ^^^^^^^^^^^
363            File "/usr/lib/python3.12/site-packages/pkg_resources/__init__.py", line 3301, in _call_aside
364              f(*args, **kwargs)
365            File "/usr/lib/python3.12/site-packages/pkg_resources/__init__.py", line 3339, in _initialize_master_working_set
366              working_set = WorkingSet._build_master()
367                            ^^^^^^^^^^^^^^^^^^^^^^^^^^
368            File "/usr/lib/python3.12/site-packages/pkg_resources/__init__.py", line 629, in _build_master
369              ws.require(__requires__)
370            File "/usr/lib/python3.12/site-packages/pkg_resources/__init__.py", line 966, in require
371              needed = self.resolve(parse_requirements(requirements))
372                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
373            File "/usr/lib/python3.12/site-packages/pkg_resources/__init__.py", line 827, in resolve
374              dist = self._resolve_dist(
375                     ^^^^^^^^^^^^^^^^^^^
376            File "/usr/lib/python3.12/site-packages/pkg_resources/__init__.py", line 868, in _resolve_dist
377              raise DistributionNotFound(req, requirers)
378          pkg_resources.DistributionNotFound: The 'pytz>=2012c' distribution was not found and is required by subliminal
379
380   Provider Guide
381       This guide is going to explain how to add a Provider to subliminal. You
382       are encouraged to take a look at the existing providers, it  can  be  a
383       nice base to start your own provider.
384
385   Requirements
386       When  starting a provider you should be able to answer to the following
387       questions:
388
389       • What languages does my provider support?
390
391       • What are the language codes for the supported languages?
392
393       • Does my provider deliver subtitles for episodes? for movies?
394
395       • Does my provider require a video hash?
396
397       Each response of these questions will help  you  set  the  correct  at‐
398       tributes for your Provider.
399
400   Video Validation
401       Not  all  providers  deliver  subtitles for Episode. Some may require a
402       hash.  The check() method does validation against a  Video  object  and
403       will  return  False  if  the  given Video isn’t suitable. If you’re not
404       happy with the default implementation, you can override it.
405
406   Configuration
407       API keys must not be configurable by the user and must remain linked to
408       subliminal. Hence they must be written in the provider module.
409
410       Per-user authentication is allowed and must be configured at instantia‐
411       tion as keyword arguments. Configuration  will  be  done  by  the  user
412       through the provider_configs argument of the list_subtitles() and down‐
413       load_best_subtitles() functions. No network operation must be done dur‐
414       ing  instantiation,  only configuration. Any error in the configuration
415       must raise a ConfigurationError.
416
417       Beyond this point, if an error occurs, a generic  ProviderError  excep‐
418       tion  must  be raised. You can also use more explicit exception classes
419       AuthenticationError and DownloadLimitExceeded.
420
421   Initialization / Termination
422       Actual authentication operations must take place  in  the  initialize()
423       method.   If  you  need anything to be executed when the provider isn’t
424       used anymore like logout, use terminate().
425
426   Caching policy
427       To save bandwidth and improve querying time, intermediate  data  should
428       be  cached  when possible. Typical use case is when a query to retrieve
429       show ids is required prior to the query to actually search  for  subti‐
430       tles.  In  that  case  the function that gets the show id from the show
431       name must be cached.  Expiration time  should  be  SHOW_EXPIRATION_TIME
432       for shows and EPISODE_EXPIRATION_TIME for episodes.
433
434   Language
435       To  be  able  to handle various language codes, subliminal makes use of
436       babelfish Language and converters. You must set the attribute languages
437       with a set of supported Language.
438
439       If you cannot find a suitable converter for your provider, you can make
440       one of your own.
441
442   Querying
443       The query() method parameters must include all  aspects  of  provider’s
444       querying with primary types.
445
446   Subtitle
447       A custom Subtitle subclass must be created to represent a subtitle from
448       the provider.  It must have relevant attributes that  can  be  used  to
449       compute the matches of the subtitle against a Video object.
450
451   Score computation
452       To be able to compare subtitles coming from different providers between
453       them, the get_matches() method must be implemented.
454
455   Unittesting
456       All possible uses of query(), list_subtitles() and  download_subtitle()
457       methods  must have integration tests. Use vcrpy for recording and play‐
458       back of network activity.  Other functions must be unittested. If  nec‐
459       essary, you can use unittest.mock to mock some functions.
460

API DOCUMENTATION

462       If  you  are  looking  for information on a specific function, class or
463       method, this part of the documentation is for you.
464
465   Core
466       subliminal.core.ARCHIVE_EXTENSIONS
467              Supported archive extensions
468
469   Video
470       subliminal.video.VIDEO_EXTENSIONS
471              Video extensions
472
473   Subtitle
474       subliminal.subtitle.SUBTITLE_EXTENSIONS
475              Subtitle extensions
476
477   Providers
478   Addic7ed
479   LegendasTv
480   NapiProjekt
481   OpenSubtitles
482   Podnapisi
483   Shooter
484   TheSubDB
485   TVsubtitles
486   Refiners
487       Refiners enrich a Video object by adding information to it.
488
489       A refiner is a simple function:
490
491       subliminal.refiners.refine(video, **kwargs)
492
493              Parameters
494
495video (Video) – the video to refine.
496
497**kwargs – additional parameters for refiners.
498
499   Metadata
500       subliminal.refiners.metadata.refine(video,     embedded_subtitles=True,
501       **kwargs)
502              Refine a video by searching its metadata.
503
504              Several Video attributes can be found:
505
506resolution
507
508video_codec
509
510audio_codec
511
512subtitle_languages
513
514              Parameters
515                     embedded_subtitles  (bool)  –  search for embedded subti‐
516                     tles.
517
518   TVDB
519       subliminal.refiners.tvdb.refine(video, **kwargs)
520              Refine a video by searching TheTVDB.
521
522              NOTE:
523                 This refiner only work for instances of Episode.
524
525              Several attributes can be found:
526
527series
528
529year
530
531series_imdb_id
532
533series_tvdb_id
534
535title
536
537imdb_id
538
539tvdb_id
540
541   OMDb
542       subliminal.refiners.omdb.refine(video, apikey=None, **kwargs)
543              Refine a video by searching OMDb API.
544
545              Several Episode attributes can be found:
546
547series
548
549year
550
551series_imdb_id
552
553              Similarly, for a Movie:
554
555title
556
557year
558
559imdb_id
560
561   Extensions
562   Score
563       This module provides the default implementation  of  the  compute_score
564       parameter in download_best_subtitles() and download_best_subtitles().
565
566       NOTE:
567          To  avoid unnecessary dependency on sympy and boost subliminal’s im‐
568          port time, the resulting scores are hardcoded here and manually  up‐
569          dated when the set of equations change.
570
571       Available matches:
572
573          • hash
574
575          • title
576
577          • year
578
579          • country
580
581          • series
582
583          • season
584
585          • episode
586
587          • release_group
588
589          • streaming_service
590
591          • source
592
593          • audio_codec
594
595          • resolution
596
597          • hearing_impaired
598
599          • video_codec
600
601          • series_imdb_id
602
603          • imdb_id
604
605          • tvdb_id
606
607   Utils
608   Cache
609       subliminal.cache.SHOW_EXPIRATION_TIME
610              Expiration time for show caching
611
612       subliminal.cache.EPISODE_EXPIRATION_TIME
613              Expiration time for episode caching
614
615       subliminal.cache.REFINER_EXPIRATION_TIME
616              Expiration time for scraper searches
617
618       subliminal.cache.region
619              The CacheRegion
620
621       Refer  to dogpile.cache’s region configuration documentation to see how
622       to configure the region
623
624   CLI
625       Subliminal uses click to provide a powerful CLI.
626
627   Exceptions

LICENSE

629       MIT
630
631Index
632
633Module Index
634
635Search Page
636

AUTHOR

638       Antoine Bertin
639
641       2023, Antoine Bertin
642
643
644
645
6462.1.0                            Jul 21, 2023                    SUBLIMINAL(1)
Impressum