diff -Nru streamlink-1.6.0+dfsg/CHANGELOG.md streamlink-1.7.0+dfsg/CHANGELOG.md --- streamlink-1.6.0+dfsg/CHANGELOG.md 2020-09-23 00:21:50.000000000 +0000 +++ streamlink-1.7.0+dfsg/CHANGELOG.md 2020-10-18 00:19:14.000000000 +0000 @@ -1,5 +1,84 @@ # Changelog +## streamlink 1.7.0 (2020-10-18) + +Release highlights: + +- Added: new plugins for micous.com, tv999.bg and cbsnews.com +- Added: new embedded ad detection for Twitch streams ([#3213](https://github.com/streamlink/streamlink/pull/3213)) +- Fixed: a few broken plugins and minor plugin issues (see changelog down below) +- Fixed: arguments in config files were read too late before taking effect ([#3255](https://github.com/streamlink/streamlink/pull/3255)) +- Fixed: Arte plugin returning too many streams and overriding primary ones ([#3228](https://github.com/streamlink/streamlink/pull/3228)) +- Fixed: Twitch plugin error when stream metadata API response is empty ([#3223](https://github.com/streamlink/streamlink/pull/3223)) +- Fixed: Zattoo login issues ([#3202](https://github.com/streamlink/streamlink/pull/3202)) +- Changed: plugin request and submission guidelines ([#3244](https://github.com/streamlink/streamlink/pull/3244)) +- Changed: refactored and cleaned up Twitch plugin ([#3227](https://github.com/streamlink/streamlink/pull/3227)) +- Removed: `platform=_` stream token request parameter from Twitch plugin (again) ([#3220](https://github.com/streamlink/streamlink/pull/3220)) +- Removed: plugins for itvplayer, aljazeeraen, srgssr and dingittv + + +```text +Alexis Murzeau (1): + docs: use recommonmark as an extension + +Billy2011 (3): + plugins.zattoo: use hello api v2 for zattoo.com (#3202) + plugins.dlive: rewrite plugin (#3239) + utils.l10n: use DEFAULT_LANGUAGE_CODE if locale lookup fails (#3055) + +Forrest (1): + plugins.itvplayer: remove due to DRM (#2934) + +Ian Cameron <1661072+mkbloke@users.noreply.github.com> (8): + plugins.mico: new plugin for http://www.micous.com/ (#3188) + plugins.cdnbg: update url_re, plugin test, plugin matrix (#3205) + plugins.tv999: new plugin for http://tv999.bg/live.html (#3199) + plugins.aljazeeraen: plugin removal (#3207) + plugins.srgssr: plugin removal + plugins.tv3cat: update URL match, test and plugin matrix + chore: update issue templates (#3250) + docs: add plugin addition/removal infos (#3249) + +Sebastian Meyer (2): + Improve coverage reports on codecov (#3200) + plugins.twitch: remove platform access token param (#3220) + +back-to (4): + plugin.api.useragents: update User-Agent + plugins.livestream: remove AkamaiHDStream, use only secure HLSStream (#3243) + plugins.dingittv: removed, website is unmaintained + plugins: mark some plugins as broken (#3262) + +bastimeyer (21): + ci.coverage: increase threshold of tests status + tests: add stream_hls mixin for testing HLSStreams + stream.hls_filtered: refactor tests, use mixin + plugins.twitch: refactor tests, use mixin + stream.hls: refactor reload time tests, use mixin + stream.hls: separate variant playlist tests + stream.hls: separate default and encrypted tests + stream.hls_playlist: implement EXT-X-DATERANGE tag + plugins.twitch: filter ads by EXT-X-DATERANGE tag + plugins.twitch: fix metadata API response handling + ci: add python 3.9 test runners + tests: fix early writer close in stream_hls mixin + stream.segmented: gracefully shut down thread pool + plugins.twitch: remove video-type distinction + plugins.twitch: refactor Twitch API related code + plugins.twitch: refactor _get_hls_streams + plugins.twitch: remove stream weights and clean up + docs: fix working tree check in deploy script + docs: update plugin guidelines + docs: add developing menu with basic setup steps + docs: add generic pull request template + +beardypig (3): + plugins.cbsnews: support for live streams from CBS News (#3251) + plugins.artetv: only pick the first variant of the stream (#3228) + cli: make config based args available during early setup (#3255) +``` + + ## streamlink 1.6.0 (2020-09-22) Release highlights: diff -Nru streamlink-1.6.0+dfsg/debian/changelog streamlink-1.7.0+dfsg/debian/changelog --- streamlink-1.6.0+dfsg/debian/changelog 2020-10-05 12:37:08.000000000 +0000 +++ streamlink-1.7.0+dfsg/debian/changelog 2020-10-20 10:21:21.000000000 +0000 @@ -1,3 +1,9 @@ +streamlink (1.7.0+dfsg-1~webupd8~bionic) bionic; urgency=medium + + * New upstream release + + -- Alin Andrei Tue, 20 Oct 2020 13:21:29 +0200 + streamlink (1.6.0+dfsg-1~webupd8~bionic) bionic; urgency=medium * New upstream release diff -Nru streamlink-1.6.0+dfsg/debian/patches/0006-Use-pycrytodomex-instead-of-pycryptodome.patch streamlink-1.7.0+dfsg/debian/patches/0006-Use-pycrytodomex-instead-of-pycryptodome.patch --- streamlink-1.6.0+dfsg/debian/patches/0006-Use-pycrytodomex-instead-of-pycryptodome.patch 2020-10-05 12:34:54.000000000 +0000 +++ streamlink-1.7.0+dfsg/debian/patches/0006-Use-pycrytodomex-instead-of-pycryptodome.patch 2020-10-20 10:24:51.000000000 +0000 @@ -114,7 +114,7 @@ @@ -3,7 +3,7 @@ import struct - from collections import defaultdict, namedtuple + from collections import defaultdict, namedtuple, OrderedDict -from Crypto.Cipher import AES +from Cryptodome.Cipher import AES from requests.exceptions import ChunkedEncodingError @@ -137,12 +137,11 @@ index d56d3b0..3b08dfd 100644 --- a/tests/streams/test_hls.py +++ b/tests/streams/test_hls.py -@@ -6,7 +6,7 @@ from functools import partial +@@ -1,7 +1,7 @@ + import os + import unittest - import pytest - import requests_mock -from Crypto.Cipher import AES +from Cryptodome.Cipher import AES - from mock import patch, Mock - - from streamlink.session import Streamlink + import pytest + import requests_mock diff -Nru streamlink-1.6.0+dfsg/docs/changelog.md streamlink-1.7.0+dfsg/docs/changelog.md --- streamlink-1.6.0+dfsg/docs/changelog.md 2020-09-23 00:21:50.000000000 +0000 +++ streamlink-1.7.0+dfsg/docs/changelog.md 2020-10-18 00:19:14.000000000 +0000 @@ -1,5 +1,84 @@ # Changelog +## streamlink 1.7.0 (2020-10-18) + +Release highlights: + +- Added: new plugins for micous.com, tv999.bg and cbsnews.com +- Added: new embedded ad detection for Twitch streams ([#3213](https://github.com/streamlink/streamlink/pull/3213)) +- Fixed: a few broken plugins and minor plugin issues (see changelog down below) +- Fixed: arguments in config files were read too late before taking effect ([#3255](https://github.com/streamlink/streamlink/pull/3255)) +- Fixed: Arte plugin returning too many streams and overriding primary ones ([#3228](https://github.com/streamlink/streamlink/pull/3228)) +- Fixed: Twitch plugin error when stream metadata API response is empty ([#3223](https://github.com/streamlink/streamlink/pull/3223)) +- Fixed: Zattoo login issues ([#3202](https://github.com/streamlink/streamlink/pull/3202)) +- Changed: plugin request and submission guidelines ([#3244](https://github.com/streamlink/streamlink/pull/3244)) +- Changed: refactored and cleaned up Twitch plugin ([#3227](https://github.com/streamlink/streamlink/pull/3227)) +- Removed: `platform=_` stream token request parameter from Twitch plugin (again) ([#3220](https://github.com/streamlink/streamlink/pull/3220)) +- Removed: plugins for itvplayer, aljazeeraen, srgssr and dingittv + + +```text +Alexis Murzeau (1): + docs: use recommonmark as an extension + +Billy2011 (3): + plugins.zattoo: use hello api v2 for zattoo.com (#3202) + plugins.dlive: rewrite plugin (#3239) + utils.l10n: use DEFAULT_LANGUAGE_CODE if locale lookup fails (#3055) + +Forrest (1): + plugins.itvplayer: remove due to DRM (#2934) + +Ian Cameron <1661072+mkbloke@users.noreply.github.com> (8): + plugins.mico: new plugin for http://www.micous.com/ (#3188) + plugins.cdnbg: update url_re, plugin test, plugin matrix (#3205) + plugins.tv999: new plugin for http://tv999.bg/live.html (#3199) + plugins.aljazeeraen: plugin removal (#3207) + plugins.srgssr: plugin removal + plugins.tv3cat: update URL match, test and plugin matrix + chore: update issue templates (#3250) + docs: add plugin addition/removal infos (#3249) + +Sebastian Meyer (2): + Improve coverage reports on codecov (#3200) + plugins.twitch: remove platform access token param (#3220) + +back-to (4): + plugin.api.useragents: update User-Agent + plugins.livestream: remove AkamaiHDStream, use only secure HLSStream (#3243) + plugins.dingittv: removed, website is unmaintained + plugins: mark some plugins as broken (#3262) + +bastimeyer (21): + ci.coverage: increase threshold of tests status + tests: add stream_hls mixin for testing HLSStreams + stream.hls_filtered: refactor tests, use mixin + plugins.twitch: refactor tests, use mixin + stream.hls: refactor reload time tests, use mixin + stream.hls: separate variant playlist tests + stream.hls: separate default and encrypted tests + stream.hls_playlist: implement EXT-X-DATERANGE tag + plugins.twitch: filter ads by EXT-X-DATERANGE tag + plugins.twitch: fix metadata API response handling + ci: add python 3.9 test runners + tests: fix early writer close in stream_hls mixin + stream.segmented: gracefully shut down thread pool + plugins.twitch: remove video-type distinction + plugins.twitch: refactor Twitch API related code + plugins.twitch: refactor _get_hls_streams + plugins.twitch: remove stream weights and clean up + docs: fix working tree check in deploy script + docs: update plugin guidelines + docs: add developing menu with basic setup steps + docs: add generic pull request template + +beardypig (3): + plugins.cbsnews: support for live streams from CBS News (#3251) + plugins.artetv: only pick the first variant of the stream (#3228) + cli: make config based args available during early setup (#3255) +``` + + ## streamlink 1.6.0 (2020-09-22) Release highlights: diff -Nru streamlink-1.6.0+dfsg/docs/conf.py streamlink-1.7.0+dfsg/docs/conf.py --- streamlink-1.6.0+dfsg/docs/conf.py 2020-09-23 00:21:50.000000000 +0000 +++ streamlink-1.7.0+dfsg/docs/conf.py 2020-10-18 00:19:14.000000000 +0000 @@ -18,17 +18,11 @@ # Add any Sphinx extension module names here, as strings. They can be extensions # coming with Sphinx (named 'sphinx.ext.*') or your custom ones. -extensions = ['sphinx.ext.autodoc', 'ext_argparse', 'ext_github', 'ext_releaseref'] +extensions = ['sphinx.ext.autodoc', 'ext_argparse', 'ext_github', 'ext_releaseref', 'recommonmark'] # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] -# The suffix of source filenames. -source_suffix = ['.rst', '.md'] -source_parsers = { - '.md': 'recommonmark.parser.CommonMarkParser', -} - # The encoding of source files. #source_encoding = 'utf-8-sig' diff -Nru streamlink-1.6.0+dfsg/docs/developing.rst streamlink-1.7.0+dfsg/docs/developing.rst --- streamlink-1.6.0+dfsg/docs/developing.rst 1970-01-01 00:00:00.000000000 +0000 +++ streamlink-1.7.0+dfsg/docs/developing.rst 2020-10-18 00:19:14.000000000 +0000 @@ -0,0 +1,135 @@ +Developing +========== + +Setup +----- + +Setting up the repository +^^^^^^^^^^^^^^^^^^^^^^^^^ + +In order to start working on Streamlink, you must first install the latest stable version of ``git``, optionally fork the +repository on Github onto your account if you want to submit changes in a pull request, and then locally clone the repository. + +.. code-block:: bash + + mkdir streamlink + cd streamlink + git clone --origin=upstream 'https://github.com/streamlink/streamlink.git' . + git remote add fork 'git@github.com:/streamlink.git' + git remote -v + git fetch --all + +When submitting a pull request, commit and push your changes onto a different branch. + +.. code-block:: bash + + git checkout master + git pull upstream master + git checkout -b new/feature/or/bugfix/branch + git add ./foo + git commit + git push fork new/feature/or/bugfix/branch + + +Setting up a new environment +^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +While working on any kind of python-based project, it is usually best to do this in a virtual environment which is isolated from +the Python environment of the host system. This ensures that development can be done in a clean space which is free of version +conflicts and other unrelated packages. + +First, make sure that you have the latest stable versions of Python and pip installed. + +.. code-block:: bash + + python --version + pip --version + +As the second preparation step, install the latest version of ``virtualenv``, either via your system's package manager or pip, +and create a new virtual environment. These environments can be created separately for different Python versions. Please refer +to the `virtualenv documentation`_ for all available parameters. There are also several wrappers around virtualenv available. + +.. code-block:: bash + + pip install --upgrade --user virtualenv + virtualenv --version + + # replace ~/venvs/streamlink with your path of choice and give it a proper name + virtualenv --download --verbose ~/venvs/streamlink + +Now activate the virtual environment by sourcing the activation shell script. + +.. code-block:: bash + + source ~/venvs/streamlink/bin/activate + + # non-POSIX shells have their own activation script, eg. FISH + source ~/venvs/streamlink/bin/activate.fish + + # on Windows, activation scripts are located in the Scripts/ subdirectory instead of bin/ + source ~/venvs/streamlink/Scripts/activate + +.. _virtualenv documentation: https://virtualenv.pypa.io/en/latest/ + + +Installing Streamlink +^^^^^^^^^^^^^^^^^^^^^ + +After activating the new virtual environment, Streamlink's build dependencies and Streamlink itself need to be installed. +Regular development dependencies and documentation related dependencies are listed in the text files shown below and need to +be installed separately. + +.. code-block:: bash + + # install additional dependencies + pip install -r dev-requirements.txt + pip install -r docs-requirements.txt + + # install Streamlink from source + # check setup.py for optional dependencies and install those manually if you need to + pip install -e . + + # validate that Streamlink is working + which streamlink + streamlink --version + + +Validating changes +------------------ + +Before submitting a pull request, run tests, perform code linting and build the documentation on your system first, to see if +your changes contain any mistakes or errors. This will be done automatically for each pull request on each change, but +performing these checks locally avoids unnecessary build failures. + +.. code-block:: bash + + # run automated tests + python -m pytest -ra + # or just run a subset of all tests + python -m pytest -ra path/to/test-file.py::TestClassName::test_method_name ... + + # check code for linting errors + flake8 + + # build the documentation + make --directory=docs clean html + $BROWSER ./docs/_build/html/index.html + + +Plugins +------- + +Adding plugins +^^^^^^^^^^^^^^ + +1. Implement the plugin in ``src/streamlink/plugins/``, similar to already existing plugins. Check the git log for recently + added or modified plugins to help you get an overview of what's needed to properly implement a plugin. A complete guide + is currently not available. +2. Add at least tests for the URL regex matching in ``tests/plugins/``. Once again, check other plugin tests from the git log. + +Removing plugins +^^^^^^^^^^^^^^^^ + +1. Remove the plugin file in ``src/streamlink/plugins/`` and the test file in ``tests/plugins/`` +2. Remove the plugin entry from the documentation in ``docs/plugin_matrix.rst`` +3. Add an entry to ``src/streamlink/plugins/.removed`` diff -Nru streamlink-1.6.0+dfsg/docs/index.rst streamlink-1.7.0+dfsg/docs/index.rst --- streamlink-1.6.0+dfsg/docs/index.rst 2020-09-23 00:21:50.000000000 +0000 +++ streamlink-1.7.0+dfsg/docs/index.rst 2020-10-18 00:19:14.000000000 +0000 @@ -64,6 +64,7 @@ plugin_matrix players issues + developing api_guide api changelog diff -Nru streamlink-1.6.0+dfsg/docs/plugin_matrix.rst streamlink-1.7.0+dfsg/docs/plugin_matrix.rst --- streamlink-1.6.0+dfsg/docs/plugin_matrix.rst 2020-09-23 00:21:50.000000000 +0000 +++ streamlink-1.7.0+dfsg/docs/plugin_matrix.rst 2020-10-18 00:19:14.000000000 +0000 @@ -20,7 +20,6 @@ - rts.com.ec - elnueve.com.ar - atv.pe -aljazeeraen aljazeera.com Yes Yes English version of the site. animelab animelab.com -- Yes Requires a login. Streams may be geo-restricted to Australia and New Zealand. app17 17app.co Yes -- ard_live daserste.de Yes Yes Streams may be geo-restricted to Germany. @@ -39,15 +38,15 @@ btsports sport.bt.com Yes Yes Requires subscription account btv btvplus.bg Yes No Streams are geo-restricted to Bulgaria. canalplus mycanal.fr No Yes Streams may be geo-restricted to France. -cdnbg - tv.bnt.bg Yes No Streams may be geo-restricted to Bulgaria. +cbsnews cbsnews.com Yes No +cdnbg - armymedia.bg Yes No Streams may be geo-restricted to Bulgaria - bgonair.bg - bloombergtv.bg - - mmtvmusic.com - - mu-vi.tv - - nova.bg - - armymedia.bg - - chernomore.bg + - bnt.bg + - live.bstv.bg - i.cdn.bg + - nova.bg + - mu-vi.tv ceskatelevize ceskatelevize.cz Yes Yes Streams may be geo-restricted to Czechia. cinergroup - showtv.com.tr Yes No - haberturk.com @@ -63,7 +62,6 @@ - delfi.ee - delfi.lv deutschewelle dw.com Yes Yes -dingittv dingit.tv Yes Yes dlive dlive.tv Yes Yes dogan - teve2.com.tr Yes Yes VOD is supported for teve2 and kanald - kanald.com.tr @@ -103,7 +101,6 @@ huya huya.com Yes No Temporarily only HLS streams available. idf1 idf1.fr Yes Yes ine ine.com --- Yes -itvplayer itv.com/itvplayer Yes Yes Streams may be geo-restricted to Great Britain. invintus player.invintus.com Yes Yes kingkong kingkong.com.tw Yes -- kugou fanxing.kugou.com Yes -- @@ -113,11 +110,12 @@ liveedu - liveedu.tv Yes -- Some streams require a login. - livecoding.tv liveme liveme.com Yes -- -livestream new.livestream.com Yes -- +livestream livestream.com Yes -- lrt lrt.lt Yes No ltv_lsm_lv ltv.lsm.lv Yes No Streams may be geo-restricted to Latvia. mediaklikk mediaklikk.hu Yes No Streams may be geo-restricted to Hungary. metube metube.id Yes Yes +mico micous.com Yes -- mitele mitele.es Yes No Streams may be geo-restricted to Spain. mjunoon mjunoon.tv Yes Yes mrtmk play.mrt.com.mk Yes Yes Streams may be geo-restricted to North Macedonia. @@ -183,10 +181,6 @@ skai skai.gr Yes No Only embedded youtube live streams are supported sportal sportal.bg Yes No sportschau sportschau.de Yes No -srgssr - srf.ch Yes No Streams are geo-restricted to Switzerland. - - rts.ch - - rsi.ch - - rtr.ch ssh101 ssh101.com Yes No stadium watchstadium.com Yes No steam steamcommunity.com Yes No Some streams will require a Steam account. @@ -224,7 +218,7 @@ - minikacocuk.com.tr - minikago.com.tr - sabah.com.tr -tv3cat tv3.cat Yes Yes Streams may be geo-restricted to Spain. +tv3cat ccma.cat Yes Yes Streams may be geo-restricted to Spain. tv4play - tv4play.se Yes Yes Streams may be geo-restricted to Sweden. Only non-premium streams currently supported. - fotbollskanalen.se @@ -233,6 +227,7 @@ - tv5mondepl... [8]_ tv8 tv8.com.tr Yes No tv360 tv360.com.tr Yes No +tv999 tv999.bg Yes -- Streams are geo-restricted to Bulgaria tvibo player.tvibo.com Yes -- tvp tvpstream.vod.tvp.pl Yes No Streams may be geo-restricted to Poland. tvplayer tvplayer.com Yes No Streams may be geo-restricted to Great Britain. Premium streams are not supported. diff -Nru streamlink-1.6.0+dfsg/docs-requirements.txt streamlink-1.7.0+dfsg/docs-requirements.txt --- streamlink-1.6.0+dfsg/docs-requirements.txt 2020-09-23 00:21:50.000000000 +0000 +++ streamlink-1.7.0+dfsg/docs-requirements.txt 2020-10-18 00:19:14.000000000 +0000 @@ -1,2 +1,2 @@ sphinx>=1.6,<1.7 -recommonmark +recommonmark>=0.5.0 diff -Nru streamlink-1.6.0+dfsg/PKG-INFO streamlink-1.7.0+dfsg/PKG-INFO --- streamlink-1.6.0+dfsg/PKG-INFO 2020-09-23 00:22:12.632934300 +0000 +++ streamlink-1.7.0+dfsg/PKG-INFO 2020-10-18 00:19:39.304337500 +0000 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: streamlink -Version: 1.6.0 +Version: 1.7.0 Summary: Streamlink is command-line utility that extracts streams from various services and pipes them into a video player of choice. Home-page: https://github.com/streamlink/streamlink Author: Streamlink diff -Nru streamlink-1.6.0+dfsg/src/streamlink/plugin/api/useragents.py streamlink-1.7.0+dfsg/src/streamlink/plugin/api/useragents.py --- streamlink-1.6.0+dfsg/src/streamlink/plugin/api/useragents.py 2020-09-23 00:21:50.000000000 +0000 +++ streamlink-1.7.0+dfsg/src/streamlink/plugin/api/useragents.py 2020-10-18 00:19:14.000000000 +0000 @@ -1,11 +1,11 @@ ANDROID = ("Mozilla/5.0 (Linux; Android 7.1.1; SM-J510FN Build/NMF26X) " "AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.87 Mobile Safari/537.36") -CHROME = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36" +CHROME = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36" CHROME_OS = ("Mozilla/5.0 (X11; CrOS armv7l 10718.34.0) " "AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.40 Safari/537.36") EDGE = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.163 Safari/537.36 Edg/80.0.361.111" -FIREFOX = "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Firefox/78.0" -FIREFOX_MAC = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:78.0) Gecko/20100101 Firefox/78.0" +FIREFOX = "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:81.0) Gecko/20100101 Firefox/81.0" +FIREFOX_MAC = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:81.0) Gecko/20100101 Firefox/81.0" IE_6 = "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; WOW64; Trident/4.0; SLCC1)" IE_7 = "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; WOW64; Trident/4.0; SLCC1)" IE_8 = "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; WOW64; Trident/4.0; SLCC1)" diff -Nru streamlink-1.6.0+dfsg/src/streamlink/plugins/aljazeeraen.py streamlink-1.7.0+dfsg/src/streamlink/plugins/aljazeeraen.py --- streamlink-1.6.0+dfsg/src/streamlink/plugins/aljazeeraen.py 2020-09-23 00:21:50.000000000 +0000 +++ streamlink-1.7.0+dfsg/src/streamlink/plugins/aljazeeraen.py 1970-01-01 00:00:00.000000000 +0000 @@ -1,39 +0,0 @@ -import re - -from streamlink.plugin import Plugin -from streamlink.plugins.brightcove import BrightcovePlayer -from streamlink.stream import RTMPStream - - -class AlJazeeraEnglish(Plugin): - url_re = re.compile(r"https?://(?:\w+\.)?aljazeera\.com") - account_id = 665003303001 - render_re = re.compile(r'''RenderPagesVideo\((?P['"])(?P\d+)(?P=q)''') # VOD - video_id_re = re.compile(r'''videoId=(?P\d+)["']''') # Live - - @classmethod - def can_handle_url(cls, url): - return cls.url_re.match(url) is not None - - def _get_streams(self): - res = self.session.http.get(self.url) - - # check two different styles to include the video id in the page - video_id_m = self.render_re.search(res.text) or self.video_id_re.search(res.text) - video_id = video_id_m and video_id_m.group("id") - - if not video_id: - self.logger.error("Could not find a video ID on this page") - return - - # Use BrightcovePlayer class to get the streams - self.logger.debug("Found video ID: {0}", video_id) - bp = BrightcovePlayer(self.session, self.account_id) - - for q, s in bp.get_streams(video_id): - # RTMP Streams are listed, but they do not appear to work - if not isinstance(s, RTMPStream): - yield q, s - - -__plugin__ = AlJazeeraEnglish diff -Nru streamlink-1.6.0+dfsg/src/streamlink/plugins/artetv.py streamlink-1.7.0+dfsg/src/streamlink/plugins/artetv.py --- streamlink-1.6.0+dfsg/src/streamlink/plugins/artetv.py 2020-09-23 00:21:50.000000000 +0000 +++ streamlink-1.7.0+dfsg/src/streamlink/plugins/artetv.py 2020-10-18 00:19:14.000000000 +0000 @@ -1,16 +1,14 @@ """Plugin for Arte.tv, bi-lingual art and culture channel.""" +import logging import re +from operator import itemgetter -from itertools import chain - -from streamlink.compat import urlparse from streamlink.plugin import Plugin from streamlink.plugin.api import validate -from streamlink.stream import HDSStream from streamlink.stream import HLSStream -from streamlink.stream import HTTPStream +log = logging.getLogger(__name__) JSON_VOD_URL = "https://api.arte.tv/api/player/v1/config/{0}/{1}?platform=ARTE_NEXT" JSON_LIVE_URL = "https://api.arte.tv/api/player/v1/livestream/{0}" @@ -32,7 +30,8 @@ "height": int, "mediaType": validate.text, "url": validate.text, - "versionShortLibelle": validate.text + "versionProg": int, + "versionLibelle": validate.text }, }, ) @@ -45,44 +44,21 @@ def can_handle_url(cls, url): return _url_re.match(url) - def _create_stream(self, stream, language): - stream_name = "{0}p".format(stream["height"]) - stream_type = stream["mediaType"] - stream_url = stream["url"] - stream_language = stream["versionShortLibelle"] - - if language == "de": - language = ["DE", "VOST-DE", "VA", "VOA", "Dt. Live", "OV", "OmU"] - elif language == "en": - language = ["ANG", "VOST-ANG"] - elif language == "es": - language = ["ESP", "VOST-ESP"] - elif language == "fr": - language = ["FR", "VOST-FR", "VF", "VOF", "Frz. Live", "VO", "ST mal"] - elif language == "pl": - language = ["POL", "VOST-POL"] - - if stream_language in language: - if stream_type in ("hls", "mp4"): - if urlparse(stream_url).path.endswith("m3u8"): + def _create_stream(self, streams): + variant, variantname = min([(stream["versionProg"], stream["versionLibelle"]) for stream in streams.values()], + key=itemgetter(0)) + log.debug(u"Using the '{0}' stream variant".format(variantname)) + for sname, stream in streams.items(): + if stream["versionProg"] == variant: + if stream["mediaType"] == "hls": try: - streams = HLSStream.parse_variant_playlist(self.session, stream_url) - - for stream in streams.items(): - yield stream + streams = HLSStream.parse_variant_playlist(self.session, stream["url"]) + for s in streams.items(): + yield s except IOError as err: - self.logger.error("Failed to extract HLS streams: {0}", err) - else: - yield stream_name, HTTPStream(self.session, stream_url) - - elif stream_type == "f4m": - try: - streams = HDSStream.parse_manifest(self.session, stream_url) - - for stream in streams.items(): - yield stream - except IOError as err: - self.logger.error("Failed to extract HDS streams: {0}", err) + log.warning(u"Failed to extract HLS streams for {0}/{1}: {2}".format(sname, + stream["versionLibelle"], + err)) def _get_streams(self): match = _url_re.match(self.url) @@ -98,10 +74,8 @@ if not video["videoJsonPlayer"]["VSR"]: return - vsr = video["videoJsonPlayer"]["VSR"].values() - streams = (self._create_stream(stream, language) for stream in vsr) - - return chain.from_iterable(streams) + vsr = video["videoJsonPlayer"]["VSR"] + return self._create_stream(vsr) __plugin__ = ArteTV diff -Nru streamlink-1.6.0+dfsg/src/streamlink/plugins/btsports.py streamlink-1.7.0+dfsg/src/streamlink/plugins/btsports.py --- streamlink-1.6.0+dfsg/src/streamlink/plugins/btsports.py 2020-09-23 00:21:50.000000000 +0000 +++ streamlink-1.7.0+dfsg/src/streamlink/plugins/btsports.py 2020-10-18 00:19:14.000000000 +0000 @@ -111,6 +111,7 @@ res = self.session.http.get(self.api_url, params=d, headers={"Accept": "application/json"}) return self.session.http.json(res) + @Plugin.broken(2946) def _get_streams(self): if self.options.get("email") and self.options.get("password"): if self.login(self.options.get("email"), self.options.get("password")): diff -Nru streamlink-1.6.0+dfsg/src/streamlink/plugins/cbsnews.py streamlink-1.7.0+dfsg/src/streamlink/plugins/cbsnews.py --- streamlink-1.6.0+dfsg/src/streamlink/plugins/cbsnews.py 1970-01-01 00:00:00.000000000 +0000 +++ streamlink-1.7.0+dfsg/src/streamlink/plugins/cbsnews.py 2020-10-18 00:19:14.000000000 +0000 @@ -0,0 +1,38 @@ +import re + +from streamlink.plugin import Plugin +from streamlink.plugin.api import validate +from streamlink.stream import HLSStream +from streamlink.utils import parse_json + + +class CBSNews(Plugin): + url_re = re.compile(r"https://www\.cbsnews\.com/live/") + _re_default_payload = re.compile(r"CBSNEWS.defaultPayload = (\{.*)") + + _schema_items = validate.Schema( + validate.transform(_re_default_payload.search), + validate.any(None, validate.all( + validate.get(1), + validate.transform(parse_json), + {"items": [validate.all({ + "video": validate.url(), + "format": "application/x-mpegURL" + }, validate.get("video"))]}, + validate.get("items") + )) + ) + + @classmethod + def can_handle_url(cls, url): + return cls.url_re.match(url) is not None + + def _get_streams(self): + items = self.session.http.get(self.url, schema=self._schema_items) + if items: + for hls_url in items: + for s in HLSStream.parse_variant_playlist(self.session, hls_url).items(): + yield s + + +__plugin__ = CBSNews diff -Nru streamlink-1.6.0+dfsg/src/streamlink/plugins/cdnbg.py streamlink-1.7.0+dfsg/src/streamlink/plugins/cdnbg.py --- streamlink-1.6.0+dfsg/src/streamlink/plugins/cdnbg.py 2020-09-23 00:21:50.000000000 +0000 +++ streamlink-1.7.0+dfsg/src/streamlink/plugins/cdnbg.py 2020-10-18 00:19:14.000000000 +0000 @@ -14,16 +14,14 @@ class CDNBG(Plugin): url_re = re.compile(r""" https?://(?:www\.)?(?: - tv\.bnt\.bg/\w+(?:/\w+)?| - nova\.bg/live| + armymedia\.bg| bgonair\.bg/tvonline| - mmtvmusic\.com/live| - mu-vi\.tv/LiveStreams/pages/Live\.aspx| + bloombergtv\.bg/video| + (?:tv\.)?bnt\.bg/\w+(?:/\w+)?| live\.bstv\.bg| - bloombergtv.bg/video| - armymedia.bg| - chernomore.bg| - i.cdn.bg/live/ + i\.cdn\.bg/live/| + nova\.bg/live| + mu-vi\.tv/LiveStreams/pages/Live\.aspx )/? """, re.VERBOSE) iframe_re = re.compile(r"iframe .*?src=\"((?:https?(?::|:))?//(?:\w+\.)?cdn.bg/live[^\"]+)\"", re.DOTALL) @@ -52,7 +50,7 @@ log.debug("Found iframe: {0}", iframe_url) iframe_url = iframe_url.replace(":", ":") if iframe_url.startswith("//"): - return "{0}:{1}".format(p.scheme, iframe_url) + return update_scheme(p.scheme, iframe_url) else: return iframe_url diff -Nru streamlink-1.6.0+dfsg/src/streamlink/plugins/cnews.py streamlink-1.7.0+dfsg/src/streamlink/plugins/cnews.py --- streamlink-1.6.0+dfsg/src/streamlink/plugins/cnews.py 2020-09-23 00:21:50.000000000 +0000 +++ streamlink-1.7.0+dfsg/src/streamlink/plugins/cnews.py 2020-10-18 00:19:14.000000000 +0000 @@ -13,6 +13,7 @@ def can_handle_url(cls, url): return cls._url_re.match(url) + @Plugin.broken() def _get_streams(self): # Retrieve URL page and search for Dailymotion URL res = self.session.http.get(self.url, headers={'User-Agent': useragents.CHROME}) diff -Nru streamlink-1.6.0+dfsg/src/streamlink/plugins/dingittv.py streamlink-1.7.0+dfsg/src/streamlink/plugins/dingittv.py --- streamlink-1.6.0+dfsg/src/streamlink/plugins/dingittv.py 2020-09-23 00:21:50.000000000 +0000 +++ streamlink-1.7.0+dfsg/src/streamlink/plugins/dingittv.py 1970-01-01 00:00:00.000000000 +0000 @@ -1,67 +0,0 @@ -import re -from streamlink.plugin import Plugin -from streamlink.plugin.api import validate -from streamlink.stream import HLSStream - - -class DingitTV(Plugin): - """ - Plugin that supports playing streams from DingIt.tv - """ - - # regex to match the site urls - url_re = re.compile(r""" - http://www.dingit.tv/( - highlight/(?P\d+)| - channel/(?P\w+)/(?P\d+) - )""", re.VERBOSE) - - # flashvars API url and schema - flashvars_url = "http://www.dingit.tv/api/get_player_flashvars" - flashvars_schema = validate.Schema({ - u"status": 0, - u"data": [{ - validate.optional("stream"): validate.text, - validate.optional("akaurl"): validate.text, - validate.optional("pereakaurl"): validate.text, - }] - }, - validate.get("data"), - validate.length(1), - validate.get(0) - ) - - pereakaurl = "http://dingitmedia-vh.akamaihd.net/i/{}/master.m3u8" - akaurl = "https://dingmedia1-a.akamaihd.net/processed/delivery/{}70f8b7bc-5ed4-336d-609a-2d2cd86288c6.m3u8" - - @classmethod - def can_handle_url(cls, url): - return cls.url_re.match(url) is not None - - @Plugin.broken() - def _get_streams(self): - match = self.url_re.match(self.url) - - res = self.session.http.post( - self.flashvars_url, - data=dict( - broadcaster=match.group("broadcaster") or "Verm", - stream_id=match.group("channel_id") or match.group("highlight_id") - ) - ) - - flashvars = self.session.http.json(res, schema=self.flashvars_schema) - - if flashvars.get("pereakaurl"): - url = self.pereakaurl.format(flashvars.get("pereakaurl").strip("/")) - return HLSStream.parse_variant_playlist(self.session, url) - - elif flashvars.get("akaurl"): - url = self.akaurl.format(flashvars.get("akaurl").strip("/")) - return HLSStream.parse_variant_playlist(self.session, url) - - elif flashvars.get("stream"): - self.logger.error("OctoStreams are not currently supported") - - -__plugin__ = DingitTV diff -Nru streamlink-1.6.0+dfsg/src/streamlink/plugins/dlive.py streamlink-1.7.0+dfsg/src/streamlink/plugins/dlive.py --- streamlink-1.6.0+dfsg/src/streamlink/plugins/dlive.py 2020-09-23 00:21:50.000000000 +0000 +++ streamlink-1.7.0+dfsg/src/streamlink/plugins/dlive.py 2020-10-18 00:19:14.000000000 +0000 @@ -1,8 +1,14 @@ +import json +import logging import re +from streamlink.compat import is_py3, unquote_plus from streamlink.plugin import Plugin, PluginError +from streamlink.plugin.api import validate from streamlink.stream import HLSStream -from streamlink.compat import unquote_plus, is_py3 + + +log = logging.getLogger(__name__) QUALITY_WEIGHTS = { @@ -11,18 +17,43 @@ class DLive(Plugin): - """ - Plugin for dlive.tv - """ - - _url_re = re.compile(r"https?://(?:www\.)?dlive\.tv/") - _playback_re = re.compile(r"""(?<=playbackUrl":")(.+?)(?=")""") - _livestream_re = re.compile(r""""livestream":null""") - _username_re = re.compile(r"(?<=user:)(\w|-)+") + _re_url = re.compile(r""" + https?://(?:www\.)?dlive\.tv/ + (?: + (?:p/(?P