Skip to content

Commit

Permalink
plugins.goodgame: Update for API change (streamlink#130)
Browse files Browse the repository at this point in the history
  • Loading branch information
beardypig committed Nov 7, 2016
1 parent 28d6737 commit 5e3b768
Showing 1 changed file with 3 additions and 13 deletions.
16 changes: 3 additions & 13 deletions src/streamlink/plugins/goodgame.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,16 @@
from streamlink.plugin.api import http
from streamlink.stream import HLSStream

HLS_URL_FORMAT = "http://hls.goodgame.ru/hls/{0}{1}.m3u8"
HLS_URL_FORMAT = "https://hls.goodgame.ru/hls/{0}{1}.m3u8"
QUALITIES = {
"1080p": "",
"720p": "_720",
"480p": "_480",
"240p": "_240"
}

_url_re = re.compile("http://(?:www\.)?goodgame.ru/channel/(?P<user>\w+)")
_stream_re = re.compile(
"meta property=\"og:video:iframe\" content=\"http://goodgame.ru/player/html\?(\w+)\""
)
_ddos_re = re.compile(
"document.cookie=\"(__DDOS_[^;]+)"
)
_url_re = re.compile("https://(?:www\.)?goodgame.ru/channel/(?P<user>\w+)")
_stream_re = re.compile(r'var src = "([^"]+)";')

class GoodGame(Plugin):
@classmethod
Expand All @@ -36,11 +31,6 @@ def _get_streams(self):
}
res = http.get(self.url, headers=headers)

match = _ddos_re.search(res.text)
if (match):
headers["Cookie"] = match.group(1)
res = http.get(self.url, headers=headers)

match = _stream_re.search(res.text)
if not match:
return
Expand Down

0 comments on commit 5e3b768

Please sign in to comment.