Commit Graph

5103 Commits

Author SHA1 Message Date
bastimeyer 503df3e15a ci.github: bump codecov/codecov-action to v4 2024-02-07 19:34:04 +01:00
bastimeyer f9a59e18d1 ci.github: bump upload/download-artifact to v4 2024-02-07 19:34:04 +01:00
bastimeyer 789e89ab8d ci.github: bump setup-python action to v5 2024-02-07 05:00:41 +01:00
bastimeyer ac457402eb options: compare equality of Argument objects
- Make all `Argument` attributes immutable
- Add `Argument.__hash__()` and `Argument.__eq__()` methods,
  so two `Argument` objects can be compared for equality
- Fix minor typing issues
2024-02-06 15:15:35 +01:00
bastimeyer 33740b6238 utils: make parametrized argparse funcs hashable
Make all parametrized argparse `type` functions hashable:
- comma_list_filter
- num
- hours_minutes_seconds
- hours_minutes_seconds_float
2024-02-06 15:15:35 +01:00
bastimeyer ecf182a9dc plugin.api: restore http_session module 2024-02-03 01:20:40 +01:00
bastimeyer d32925a08e session: move plugin.api.http_session
- Move `streamlink.plugin.api.http_session` module
  to `streamlink.session.http`
- Deprecate old (and unnecessary) `HTTPSession` export
  in `streamlink.plugin.api`
- Fix custom `HTTPAdapter` imports in plugins
- Fix imports and fix monkeypatch paths in tests

In the next commit:
Restore the `streamlink.plugin.api.http_session` module and re-export
`HTTPSession` and the `HTTPAdapter` classes with deprecation warnings.
2024-02-03 01:20:40 +01:00
bastimeyer b82adee59a session: move StreamlinkOptions
- Move `StreamlinkOptions` from `streamlink.session`
  to `streamlink.session.options`
- Move docstring containing options list from `Streamlink.set_option()`
  to `StreamlinkOptions` and add this class to the docs
- Move default options from `Streamlink` constructor
  to `StreamlinkOptions._DEFAULTS`, so all options data is defined
  in the `streamlink.session.options` module
- Move session options tests to `tests.session.test_options`
  and change order of tests
2024-02-03 01:20:40 +01:00
bastimeyer 60432bb798 session: remove unneeded PythonDeprecatedWarning
This should've been removed with 8034b16
2024-02-03 01:20:40 +01:00
bastimeyer 282098a76a session: turn session module into a sub-package
- Create `streamlink.session` sub-package and move `session` module
  - Update/fix logger name
- Create `tests.session` sub-package and move `test_session` module
  - Fix monkeypatch paths
- Run session tests with a higher priority
2024-02-03 01:20:40 +01:00
bastimeyer 5ce6cc7a77 compat: add deprecated() function 2024-02-03 00:36:35 +01:00
bastimeyer a31b123d36 tools: bump ruff to 0.2.0 and update config 2024-02-02 01:21:44 +01:00
bastimeyer fea9b36682 utils.parse: fix import path 2024-02-01 10:48:19 +01:00
streamlinkbot e10e0abbef plugin.api: update useragents 2024-01-31 16:40:09 -08:00
bastimeyer 293c80c8c2 plugins.rtbf: remove plugin 2024-01-30 19:11:01 +01:00
bastimeyer 5975263c79 plugins.qq: remove plugin 2024-01-30 19:06:52 +01:00
bastimeyer c45bf3c27d tests: re-use PathEntryFinder in test_plugins 2024-01-29 20:27:06 +01:00
bastimeyer 19f361c4d6 session: re-use PathEntryFinder in load_plugins() 2024-01-29 20:27:06 +01:00
bastimeyer d4d351e4dd utils.module: fix load_module(), add exec_module()
- Use global finder cache via `pkgutil.get_importer()`
  instead of always creating a new `FileFinder` object for each module
- Add `exec_module()` for being able to reuse `PathEntryFinder` objects
  returned by `pkgutil.iter_modules()`
- Add support for pathlib path objects
- Update tests
2024-01-29 20:27:06 +01:00
bastimeyer 9e2eb81c97 tests: remove pytest downgrade again
pytest-asyncio 0.23.4 has been released and now itself limits
pytest to <8, so this does not have to be done by us anymore.

As soon as pytest-asyncio will have resolved its incompatibilities with
pytest >=8, the latest versions will be picked up by pip automatically.
2024-01-29 00:11:40 +01:00
bastimeyer e9c01893b4 tests: downgrade pytest
Skip installing pytest>=8.0.0 until pytest-asyncio has been fixed
2024-01-28 07:30:02 +01:00
bastimeyer 617044d946 tests: fix session init 2024-01-27 05:25:22 +01:00
bastimeyer 61a4f33905 tools: bump ruff to 0.1.14 and fix issues 2024-01-25 18:14:59 +01:00
bastimeyer 24435cb8a3 plugins: replace pluginargument help f-strings 2024-01-24 19:40:17 +01:00
bastimeyer 38e2fb1592 plugins.aloula: add HTTP headers, update matchers 2024-01-21 16:01:22 +01:00
bastimeyer 6fe26dac76 plugin: add missing pluginargument type functions
- Add `int` and `float` types to the pluginargument type registry
- Rename `boolean` to `bool`
2024-01-21 15:22:23 +01:00
bastimeyer 91cd146c69 plugins.huya: fix stream URLs
- set Referer and Origin headers
- only keep the `wsSecret` and `wsTime` query string params
  in the stream URLs
- remove stream URL HEAD requests for checking the availability
- add stream priority override for faulty TLS server configs
2024-01-19 11:01:31 +01:00
bastimeyer 759c29e471 utils.args: add unique arg to comma_list_filter 2024-01-17 20:15:10 +01:00
bastimeyer c1a72a8803 plugins: switch pluginargument type values to str
And remove unneeded type functions
2024-01-16 14:50:51 +01:00
bastimeyer e24374b07b plugin: add str to pluginargument type argument
- Make built-in plugins use pluginargument type functions referenced
  via name, so the pluginargument data can be fully JSON-serialized
- Add the `type_args`/`type_kwargs` arguments to `@pluginargument()`
  which allow the parametrization of the name-referenced type function
- Add a pluginargument type registry to the `streamlink.plugin.plugin`
  module and add all functions of the `streamlink.utils.args` module,
  as well as the `hours_minutes_seconds{,_float}` functions of
  the `streamlink.utils.times` module
- Update docs
- Add tests
2024-01-16 14:50:51 +01:00
bastimeyer e56adac40d options: refactor Argument/pluginargument
- Explicitly define keywords passed to `ArgumentParser.add_argument()`
  so they can be properly type-checked
- Update `Argument.options` accordingly and add tests
- Fix `Argument.requires` value
- Update docstrings
2024-01-16 14:33:39 +01:00
bastimeyer 163a9b6e2d cli: fix --ringbuffer-size help text 2024-01-16 14:28:46 +01:00
bastimeyer 815435622f utils.args: fix filesize()
- Strip whitespace at the beginning and at the end
- Set regex anchors
2024-01-16 14:28:46 +01:00
bastimeyer 888cc01078 utils.args: fix keyvalue()
- Strip whitespace at the beginning and set regex anchors
- Ignore trailing key name whitespace
2024-01-16 14:28:46 +01:00
bastimeyer ca9fe36ce5 utils.args: rewrite module
- Add typing annotations
- Replace `argparse.ArgumentTypeError` with `ValueError`
  and add missing `ValueError` messages
- Simplify `comma_list_filter()` using list comprehension syntax
- Update `filesize`
  - Simplify and fix regex
  - Use unit/modifier map
  - Fix zero value check
- Rewrite tests
2024-01-16 14:28:46 +01:00
bastimeyer f868f96959 release: 6.5.1 2024-01-16 14:10:47 +01:00
bastimeyer 4e58141c26 tests: fix positive URLs assertion in plugins test 2024-01-15 20:24:21 +01:00
bastimeyer 6d5117569c plugins.artetv: rewrite and fix plugin 2024-01-14 21:32:30 +01:00
bastimeyer 89716761ad tools: bump ruff to 0.1.13 and fix issues 2024-01-13 17:09:27 +01:00
bastimeyer 27b0da5759 plugins.bilibili: query API on missing stream data 2024-01-13 15:24:27 +01:00
bastimeyer 9cf393e3bb plugins.vidio: fix stream token 2024-01-08 04:58:11 +01:00
bastimeyer 27087e0b6d docs: unlist Void Linux package 2024-01-07 14:36:54 +01:00
bastimeyer 4b77a0f7bb docs: unlist NetBSD package 2024-01-07 14:36:54 +01:00
bastimeyer 40765c7f38 cli: improve quoted player path warning 2024-01-04 16:27:49 +01:00
bastimeyer 36a2af2963 plugins.twitch: disable headless mode 2024-01-04 15:09:14 +01:00
bastimeyer 1d7fc8d068 plugins.bigo: rewrite and fix plugin 2024-01-03 12:29:33 +01:00
digitechtv fb953fbc0f plugins.atresplayer: fix live API request 2024-01-02 17:41:54 +01:00
bastimeyer c7d6b16520 2024 2024-01-01 14:07:02 +01:00
streamlinkbot e1d1426a6c plugin.api: update useragents 2023-12-31 19:09:20 -08:00
bastimeyer 7337e47ae7 ci.github: bump Python version 2023-12-31 16:08:03 +01:00