Commit Graph

4413 Commits

Author SHA1 Message Date
bastimeyer 7bcba1bcfc ci.github: add regular Python 3.11 runners 2022-10-28 22:09:25 -07:00
bastimeyer 6aa2b56e35 plugins.dailymotion: fix validation schema 2022-10-28 09:40:27 -07:00
bastimeyer 37dc0b2029 plugins.tvp: rewrite and fix plugin, add VODs 2022-10-27 19:14:47 -07:00
bastimeyer 2aecef7d7f chore: update issue forms 2022-10-24 09:43:01 -07:00
bastimeyer 55649ecc2a plugins.tf1: rewrite plugin, add "stream" VODs
Co-Authored-By: BZHDeveloper <inizan.yannick@gmail.com>
2022-10-18 11:17:30 -07:00
bastimeyer e4166bcc12 plugins.btv: fix validation schema 2022-10-14 22:17:56 +02:00
Ian Cameron a556304742 plugins.tv8: update stream URL regex 2022-10-14 22:17:20 +02:00
bastimeyer bfcd3725c5 plugins.atresplayer: update input URLs 2022-10-09 17:10:25 -07:00
bastimeyer 26e915e391 plugins.goltelevision: add missing HTTP headers 2022-10-09 17:10:11 -07:00
bastimeyer 204c5b565d plugins.tvrplus: rewrite plugin 2022-10-07 15:10:07 -07:00
bastimeyer 49f54d886d plugins.qq: rewrite and fix plugin 2022-10-04 09:58:09 -07:00
bastimeyer e665938d93 plugins.egame: remove plugin 2022-10-04 17:52:31 +01:00
bastimeyer d17cf06d61 plugins.sbscokr: rewrite and fix plugin 2022-10-03 21:44:29 -07:00
bastimeyer d82184af1d stream.ffmpegmux: validate FFmpeg version
and log FFmpeg version output on the debug logging level
2022-10-02 12:17:39 -07:00
bastimeyer 15768e3acd utils: implement ProcessOutput
New utility class for executing a subprocess and asynchronously reading
its stdout and stderr streams line by line while the process is running,
with an optional timeout which kills the process. The output streams
and exit code get passed to callback methods which can control the
process execution and final output result.

This is useful for validating unknown executables, e.g. when querying
a version string output, as it avoids reading the entire stdout/stderr
at once and also avoids waiting for the process to terminate on its own.
2022-10-02 12:17:39 -07:00
bastimeyer dd88469fec logger: fix trace() module name on py311 2022-10-02 11:22:19 -07:00
streamlinkbot fe1604eacd plugin.api: update useragents 2022-10-01 02:19:15 +02:00
bastimeyer e5a29c6aa2 plugins.hiplayer: fix plugin 2022-09-30 15:46:21 -07:00
bastimeyer 4b6077d1da plugin: fix get_argument() 2022-09-27 11:49:07 -07:00
bastimeyer 3708c736b9 plugin: remove broken decorator 2022-09-27 11:45:16 -07:00
bastimeyer 707ffd774c plugins.raiplay: update and fix plugin 2022-09-25 11:42:09 -07:00
bastimeyer ee230e47ca plugins.vinhlongtv: rewrite and fix plugin 2022-09-25 09:24:40 +02:00
bastimeyer facf193437 ci.github: bump actions to latest version 2022-09-22 21:14:30 -07:00
bastimeyer dab404d59b plugin.api.http_session: update and fix typing 2022-09-23 02:59:12 +02:00
bastimeyer 47d170beb2 release: 5.0.1 2022-09-22 16:21:40 +02:00
bastimeyer 8bd58c047c plugins.rtve: fix ZTNR.translate 2022-09-21 13:52:24 +02:00
bastimeyer 72f83c74f0 plugins.mitele: strip whitespace from stream URLs 2022-09-20 16:29:33 +01:00
UltraHDR e907538896
plugins.hiplayer: remove cnbcarabia.com (#4836) 2022-09-19 19:30:19 +02:00
bastimeyer 2b88f0ad31 docs: bump furo theme version to 2022.09.15 2022-09-19 10:06:17 -07:00
bastimeyer 14cb86ebd4 cli.utils.progress: fix relative Windows paths 2022-09-17 11:49:41 -07:00
bastimeyer 64e8be7add release: 5.0.0 2022-09-16 18:17:13 +02:00
bastimeyer ee03db2455 stream.ffmpegmux: remove avconv 2022-09-14 09:32:34 -07:00
bastimeyer 1e6620adc5 plugins.piczel: rewrite 2022-09-12 20:02:42 -07:00
bastimeyer ca1a430277 plugins.dailymotion: rewrite and fix plugin 2022-09-12 19:49:32 -07:00
bastimeyer 33ba25a2a8 plugins.linelive: rewrite 2022-09-12 19:43:35 -07:00
bastimeyer bf2b107fd0 plugins.tv3cat: rewrite 2022-09-12 19:34:01 -07:00
bastimeyer 283e177ba6 plugin: fix type of url property 2022-09-10 14:13:41 -07:00
Ömer Görür 43d9db7f66
plugins.turkuvaz: rewrite, update supported sites (#4819)
Co-authored-by: bastimeyer <mail@bastimeyer.de>
2022-09-10 22:52:17 +02:00
Ömer Görür 2d1364e5ac
plugins.cinergroup: fix showtvcomtr (#4817) 2022-09-10 16:56:47 +02:00
Ömer Görür cd3fd7c3fb
plugins.cinergroup: rewrite, add bloomberght (#4813)
Co-authored-by: Sebastian Meyer <mail@bastimeyer.de>
2022-09-10 13:32:06 +02:00
bastimeyer 165b4880e6 stream: add session typing information
- Add typing information to `Stream`
- Explicitly set the stream, reader, worker and writer types
- Fix minor typing issues
2022-09-09 21:36:25 -07:00
bastimeyer 95df07c165 plugin: add session typing information
- Add typing information to `Plugin.session`
- Implement `http_session` stub file due to the `HTTPSession` subclass
  of `requests.Session` which adds additional keywords to the
  `request()` method, including all other HTTP-verb methods
- Add `flake8-pyi` and `typing_extensions` to dev-requirements.txt
  (`typing_extensions` is not a runtime dependency)
2022-09-09 18:13:39 -07:00
Mehavoid 1a23909cc2
plugins.trovo: fix VODs (#4812) 2022-09-10 01:03:39 +02:00
bastimeyer c29d58a00f ci: install custom lxml wheel on cp311 win-amd64
Install temporary custom lxml wheel on Windows built in an external
repo, as official wheels are missing for Python 3.11. Building it
from source requires building libxml2 and libxslt first and patching
the wheel build config, which is slow and tedious.
2022-09-08 10:31:21 -07:00
bastimeyer fff57f041d build: add Python 3.11 to package classifiers 2022-09-07 15:50:14 -07:00
bastimeyer 9923b40a6e plugins.twitch: remove disable-hosting
Twitch will remove the channel hosting feature on 2022-10-03:
https://help.twitch.tv/s/article/how-to-use-host-mode?language=en_US#faq
2022-09-07 15:49:47 -07:00
bastimeyer 46496db369 docs: handle suppressed plugin arguments
and remove AST parser workaround for py37, as the currently used version
of the Furo theme doesn't build on py37 anyway
2022-09-06 18:13:18 -07:00
bastimeyer 89d9453ad0 plugin.api.http_session: remove parse_* methods
The `parse_{cookies,headers,query_params}` methods were added when the
subclass of `requests.Session` was implemented in order to support
setting cookies, headers and query parameters via `k1=v1;k2=v2` strings
(in addition to key-value dicts) via the session API and via the CLI:
- 936e66dd90
- c6e54fd57a

Since these methods implement logic purely for the `Streamlink` session
interface and are not meant to be called by any plugin or stream
implementations which use the session's `HTTPSession` instance, they
should be removed. Cookies, headers and query string parameters should
be set directly on their respective `HTTPSession` attributes:
- `cookies`: instance of `requests.cookies.RequestsCookieJar`
- `headers`: instance of `requests.structures.CaseInsensitiveDict`
- `params`: instance of `dict`

Also, at least in regards to HTTP headers, the `key=value` syntax
does not reflect the syntax of raw HTTP requests/responses or interfaces
of other tools like cURL, etc., so having these methods on the
`HTTPSession` class makes it unnecessarily confusing. The method names
themselves are also confusing, as they suggest that the input gets
parsed and that some result gets returned, which is wrong.

This commit therefore moves the `k1=v1;k2=v2` string logic from the
`http_session` module to the `session` module where it belongs and it
also simplifies the option setter.
2022-09-05 11:29:45 -07:00
bastimeyer 8a7717f549 chore: strings
- replace-interpolation-with-fstring
- use-fstring-for-concatenation
2022-09-02 20:23:20 -07:00
bastimeyer b8f15ad7dc chore: if-else blocks
- remove-redundant-if
- remove-unnecessary-else
- useless-else-on-loop
- merge-else-if-into-elif
- swap-if-else-branches
- de-morgan
- or-if-exp-identity
- refactor some plugin logic
2022-09-02 20:23:20 -07:00