Skip to content

Commit 34f0172

Browse files
vstavrinovback-to
authored andcommitted
plugins.live_russia_tv: fix iframe format differences (streamlink#2375)
1 parent c1ef0b5 commit 34f0172

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/streamlink/plugins/live_russia_tv.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
import logging
22
import re
33

4+
from streamlink.compat import parse_qsl, urlparse
45
from streamlink.plugin import Plugin
5-
from streamlink.plugin.api import validate
6+
from streamlink.plugin.api import useragents
67
from streamlink.plugin.api.utils import itertags
78
from streamlink.stream import HLSStream, HTTPStream
89

@@ -37,8 +38,12 @@ def _get_stream_info_url(self, url):
3738
return "https:{domain}/iframe/datalive/id/{id}/sid/{sid}".format(**data)
3839
else:
3940
return "https:{domain}/iframe/datavideo/id/{id}/sid/{sid}".format(**data)
41+
else:
42+
args = dict(parse_qsl(urlparse(url).query))
43+
return "https://player.vgtrk.com/iframe/datalive/id/{id}/sid/{sid}".format(**args)
4044

4145
def _get_streams(self):
46+
self.session.http.headers.update({"User-Agent": useragents.FIREFOX})
4247
iframe_url = self._get_iframe_url(self.url)
4348

4449
if iframe_url:
@@ -73,9 +78,4 @@ def _get_streams(self):
7378
log.error("Could not find video iframe")
7479

7580

76-
77-
78-
79-
80-
8181
__plugin__ = LiveRussia

0 commit comments

Comments
 (0)