Returns a dict containing the streams, where the key is
the name of the stream (most commonly the quality name), with the value
being a Stream instance.
The result can contain the synonyms best and worst which
point to the streams which are likely to be of highest and
lowest quality respectively.
If multiple streams with the same name are found, the order of
streams specified in stream_types will determine which stream
gets to keep the name while the rest will be renamed to
The synonyms can be fine-tuned with the sorting_excludes
parameter, which can be one of these types:
A list of filter expressions in the format
[operator]<value>. For example the filter ">480p" will
exclude streams ranked higher than "480p" from the list
used in the synonyms ranking. Valid operators are >, >=, <
and <=. If no operator is specified then equality will be tested.
A function that is passed to filter() with a list of
stream names as input.
stream_types -- A list of stream types to return
sorting_excludes -- Specify which streams to exclude from the best/worst synonyms
Store the cookies from session.http in the plugin cache until they expire. The cookies can be filtered
by supplying a filter method. e.g. lambdac:"auth"inc.name. If no expiry date is given in the
cookie then the default_expires value will be used.
cookie_filter (Callable[[Cookie], bool] | None) -- a function to filter the cookies
default_expires (int) -- time (in seconds) until cookies with no expiry will expire
A matcher consists of a compiled regular expression pattern for the plugin's input URL,
a priority value and an optional name.
The priority value determines which plugin gets chosen by
Streamlink.resolve_url() if multiple plugins match the input URL.
The matcher name can be used for accessing it and its matching result when multiple matchers are defined.
Plugins must at least have one matcher. If multiple matchers are defined, then the first matching one
according to the order of which they have been defined (top to bottom) will be responsible for setting the
Plugin.matcher and Plugin.match attributes on the Plugin instance.
The Plugin.matchers and Plugin.matches attributes are affected by all defined matchers,
and both support referencing matchers and matches by matcher index and name.
Decorator for plugin arguments. Takes the same arguments as Argument.
fromstreamlink.pluginimportPlugin,pluginargument@pluginargument("username",requires=["password"],metavar="EMAIL",help="The username for your account.",)@pluginargument("password",sensitive=True,metavar="PASSWORD",help="The password for your account.",)classMyPlugin(Plugin):...
This will add the --myplugin-username and --myplugin-password arguments to the CLI,
assuming the plugin's module name is myplugin.