Commit Graph

4794 Commits

Author SHA1 Message Date
bastimeyer 5c7cf4cdc4 docs: improve migration of {g,s}et_plugin_option()
- Add code examples
- Reword paragraphs
- Fix missing parenthesis
2023-08-14 20:48:36 +02:00
bastimeyer 1997443624 utils.times: rewrite hours_minutes_seconds()
- Add support for floats via `hours_minutes_seconds_float()`
- Add support for negative timestamps
- Rewrite regexes and be as strict as possible
- Rewrite and parametrize tests with an extensive list of formats
- Update cli.argparser/plugin arguments using `hours_minutes_seconds()`
2023-08-12 16:58:29 +02:00
bastimeyer 5beda9470a docs: add icons to packages and install methods 2023-08-08 09:47:36 -07:00
bastimeyer bb906ab426 docs: replace simple/grid-tables with list-tables 2023-08-08 18:11:21 +02:00
bastimeyer 2af18840a7 docs: add more links to index page 2023-08-07 19:54:10 +02:00
bastimeyer 7d59d6a488 chore: update GitHub issue templates 2023-08-07 09:30:04 -07:00
Pablo Hoffman 1124b52f0c plugins.atresplayer: fix player API URL
Co-Authored-By: bastimeyer <mail@bastimeyer.de>
2023-08-07 00:23:59 +02:00
bastimeyer a1e2886e17 utils.processoutput: reorder asyncio tasks
Try to drain the stdout/stderr streams first before handling
the onexit task, so the overall result can be processed correctly
2023-08-06 20:00:10 +02:00
bastimeyer 180136d3cc cli.argparser: fix config file args parser
- Fix options regex
  - parse all alphanumerical options with dashes
  - be more strict around the option-value operator
    and properly ignore invalid option formats, just like comments
- Fix parsing of shorthand options
- Add tests
2023-08-05 17:45:17 +02:00
bastimeyer 3a38ca2e6f stream.hls: set min segment queue threshold to 5s
Wait for at least 5 seconds before stopping early, regardless of
the playlist's targetduration and hls-segment-queue-threshold value
2023-08-04 23:11:57 +02:00
bastimeyer 8dcccf17bb stream.hls: set --hls-segment-queue-threshold to 3
Increase the default value from 2 to 3, so that the default
configuration doesn't unnecessarily cause issues in certain live streams
where the connection of the broadcaster is unstable and the streaming
provider doesn't or can't queue new segments.

Try to keep this value reasonably low, so we can still stop streams
early when the `EXT-X-ENDLIST` tag is missing.
2023-08-04 23:11:57 +02:00
bastimeyer d365d13ee7 stream.hls: add --hls-segment-queue-threshold
Allow users to customize the segment queue timing threshold which checks
whether to stop the stream early if no new segments were queued after
the playlist's target-duration multiplied by the queue-threshold-factor
has passed.
2023-08-04 23:11:57 +02:00
bastimeyer 4a234ff76a release: 6.0.1 2023-08-02 15:46:26 +02:00
bastimeyer 16c3cc6081 tools: bump ruff to 0.0.282 and fix issues 2023-08-01 19:34:52 +02:00
bastimeyer 71a3573207 docs: update/fix 6.0.0 changelog 2023-08-01 09:04:13 -07:00
bastimeyer 1676295b19 docs: add {g,s}et_plugin_option to migrations 2023-08-01 09:04:13 -07:00
streamlinkbot b554c0fce8 plugin.api: update useragents 2023-07-31 17:50:51 -07:00
bastimeyer 8269bee266 session: add options argument to streams() 2023-07-31 09:13:36 -07:00
bastimeyer e83e09561f plugins.huya: force https stream URLs 2023-07-29 18:51:22 -07:00
bastimeyer 3cd4378a4d docs: bump furo theme to 2023.07.26
- Bump furo sphinx theme to latest version
- Require sphinx >=6.0.0
2023-07-28 18:29:24 -07:00
bastimeyer 80ca8cc0db chore: reorder dev-requirements
- Properly group dependencies by type
- Remove typing-extensions from dev-requirements, as it's already
  a runtime dependency since 6.0.0
2023-07-28 10:48:37 -07:00
bastimeyer 65008d19ca docs: bump and reorder docs-requirements
- Bump max version of sphinx from <7 to <8
- Bump max version of myst-parser to <3
- Pinpoint sphinx-design to 0.5.0
- Properly group dependencies by type
2023-07-28 10:48:04 -07:00
bastimeyer 1ead72dd1e release: 6.0.0 2023-07-20 14:35:20 +02:00
bastimeyer 28fa0ca249 docs: update Arch Linux package link 2023-07-19 22:36:01 +02:00
bastimeyer d70fe487db docs: add client-integrity to Twitch plugin docs 2023-07-19 22:21:16 +02:00
bastimeyer d1759665be docs: add docs page for Options class
- Add `api/options` page and document `Options` class
- Move `Argument` and `Arguments` from plugin page to options page
- Add docstrings for `Streamlink.options` and `Plugin.options`
2023-07-18 20:33:18 +02:00
bastimeyer ad1b54b830 build: new Streamlink signing key 44448A298D5C3618
Replace old signing key:
E2B794C7C2C37162E5E2A097E3DB9E282E390FA0

With new one:
CDAC41B9122470FAF357A9D344448A298D5C3618
2023-07-18 19:32:27 +02:00
bastimeyer 628e8ab910 build: move setuptools config to pyproject.toml
- Move setuptools's package discovery config and data-files config
  to pyproject.toml
- Remove empty setup.cfg
2023-07-17 02:39:23 +02:00
bastimeyer 3d477cd530 build: project metadata in pyproject.toml PEP621
Move Streamlink's project metadata from setuptools's own `setup.cfg`
to the standardized `pyproject.toml` format (PEP621)

- Bump setuptools to `>=64.0.0`
- Bump pip dev-requirement to `>=21.0.0`
- Set two `author` entries, to keep the same `Author` and `Author-email`
  core metadata in the resulting sdist and bdist packages
- Set `license.text` field instead of `license.file` and add the
  setuptools-specific `license-files` config attribute, so that
  the `License` and `License-File` core metadata doesn't change.
  License data will receive another change in the future once PEP639
  comes into effect
- By switching to PEP621 metadata, implicitly move the `Home-page`
  core metadata to `Project-URL: Homepage, ...`
- Remove upper version constraint from `requires-python`
- Reformat some version strings of the `dependencies` field
2023-07-17 02:39:23 +02:00
bastimeyer 07d627fbef docs: improve config-file + plugin sideloading 2023-07-15 16:25:46 +02:00
bastimeyer 0d4e81debd plugins.lrt: fix plugin 2023-07-15 16:24:38 +02:00
bastimeyer a9e3a73aa4 plugins.rtvs: fix plugin 2023-07-15 16:23:52 +02:00
bastimeyer d89c796740 docs: update Streamlink Twitch GUI image 2023-07-13 21:31:40 +02:00
bastimeyer 33781b706e docs: add migrations page, rewrite deprecations 2023-07-13 03:11:13 +02:00
bastimeyer 15c9502526 plugins.mitele: fix missing CDN token 2023-07-12 15:43:56 +02:00
bastimeyer e9500dff88 plugins.twitch: webbrowser-based client-integrity
Implement client-integrity-token acquirement using the webbrowser API:

1. Generate a new device ID
2. Open www.twitch.tv/CHANNEL and intercept its request with a dummy
   response that returns an empty HTML document
3. Execute JS code which acquires the client-integrity token, similar
   to the setup of Twitch's web player
4. Parse result and check the `is_bad_bot` value
5. Cache result and device-ID on success and set the GQL API endpoint
   headers for the access token

Also:

- Add `--twitch-purge-client-integrity`
- Forward any `--twitch-api-header` values to the web browser when
  acquiring a new client-integrity token (e.g. auth data)
- Rewrite access token schema result logic:
  - Don't rely on `TypeError`s for checking whether a channel is offline
  - Propagate any `PluginError`s when parsing the API response
  - Always attempt to get an access token without a client-integrity
    token first in order to avoid having to launch the web browser
    when Twitch doesn't require a client-integrity token
- Update tests
2023-07-11 18:01:10 +02:00
bastimeyer a4afe049b4 utils.random: add random_token() utility 2023-07-11 18:01:10 +02:00
bastimeyer 7bfaf39505 webbrowser: minor docs improvements
- Update help text of `--webbrowser` CLI argument
- Add CDP docs link to `CDPBase` class docstring
2023-07-09 22:52:03 -07:00
bastimeyer e9a29c464e stream: fix signatures of Stream classes & methods
Rename `session_` to `session`
2023-07-09 20:50:10 +02:00
bastimeyer d59377398e stream: properly filter requests args
- Revert `keywords` arg added to `HLSStream.parse_variant_playlist()`
  in d314c5b
- Filter all variable keyword arguments before making any HTTP session
  calls or storing the request args dict
- Make variable keyword arguments of all common public Stream methods
  consistent by renaming them to "kwargs"
2023-07-09 20:50:10 +02:00
bastimeyer 0c73b1c883 docs: fix header and sections in api/stream 2023-07-09 11:54:24 +01:00
bastimeyer 14c8ca5c10 build: set min-version of typing-extensions 2023-07-08 01:04:20 +02:00
bastimeyer 9edc424598 utils.crypto: move Crypto imports to utils module 2023-07-06 19:14:32 +02:00
bastimeyer f43e7ad1f5 ci.github: remove custom lxml cp312 wheel 2023-07-06 19:10:07 +02:00
bastimeyer 4c6fdb1178 tests: fix py312 issues 2023-07-06 00:42:22 +02:00
bastimeyer 2a4148eea2 webbrowser: improve resolve error message 2023-07-06 00:34:15 +02:00
bastimeyer 8c13e204f0 webbrowser.chromium: add MSEdge fallback on win32 2023-07-05 21:59:26 +02:00
bastimeyer 7c3d954803 webbrowser.cdp: replace f-string w/ LogRecord args
Don't perform potentially expensive string formatting
when we're not even logging the message.
2023-07-04 21:36:22 +02:00
bastimeyer 48cb934048 webbrowser.cdp: add CDP connection docs 2023-07-04 21:07:59 +02:00
bastimeyer 60459461fd webbrowser.cdp: implement CDP client 2023-07-04 10:59:46 +02:00