plugins.tvtoya: minor fixes

- update url_re for www. and literal dot escaping
- remove unnecessary update_scheme()
This commit is contained in:
Ian Cameron 2021-02-07 01:34:48 +00:00 committed by Forrest
parent e9663fdfc3
commit da0bfe9353
1 changed files with 2 additions and 6 deletions

View File

@ -3,13 +3,12 @@ import re
from streamlink.plugin import Plugin
from streamlink.stream import HLSStream
from streamlink.utils import update_scheme
log = logging.getLogger(__name__)
class TVToya(Plugin):
_url_re = re.compile(r"https?://tvtoya.pl/live")
_url_re = re.compile(r"https?://(?:www\.)?tvtoya\.pl/live")
_playlist_re = re.compile(r'<source src="([^"]+)" type="application/x-mpegURL">')
@classmethod
@ -22,10 +21,7 @@ class TVToya(Plugin):
playlist_m = self._playlist_re.search(res.text)
if playlist_m:
return HLSStream.parse_variant_playlist(
self.session,
update_scheme(self.url, playlist_m.group(1)),
)
return HLSStream.parse_variant_playlist(self.session, playlist_m.group(1))
else:
log.debug("Could not find stream data")