chrippa / livestreamer

Command-line utility that extracts streams from various services and pipes them into a video player of choice. No longer maintained, use streamlink or youtube-dl instead.
http://livestreamer.io/
BSD 2-Clause "Simplified" License
3.88k stars 583 forks source link

(Done): Goodgame plugin for NEW site goodgame.ru #1518

Open psihkakihmalo opened 7 years ago

psihkakihmalo commented 7 years ago

I'm not a programmer. But, I think, I did it... unexpectedly... at random ) ...and it works )

NOTE: It works only with http links. With https links - not. Just get rid of "s" if you see https://goodgame.ru/...

goodgame.py: http://www42.zippyshare.com/v/iM5QeDIS/file.html https://www.dropbox.com/s/ikd3q1o2qiu2wt9/goodgame.py?dl=0

flijloku commented 7 years ago

Fine! goodgame.ru/channel/... works too!

psihkakihmalo commented 7 years ago

they again changed the site ( ...now only https ...I am here helpless ...need python-programmer I get an error: 'socket.error' Errno 10054

flijloku commented 7 years ago

I have created a working plugin using it: https://github.com/chrippa/livestreamer/pull/1160, but it is quite raw and some channels do not work (at least https://goodgame.ru/channel/Miker/): https://yadi.sk/d/-MA5GdyrxbmN7

psihkakihmalo commented 7 years ago

flijloku, unfortunately your plugin not works... all streams don't run... I do not know why

By the way, to run (Miker, Pomi / and others) need parse stream-page and search "objPid"

Miker: view-source:https://goodgame.ru/channel/Miker/#autoplay Run: livestreamer hls://http://hls.goodgame.ru/hls/6.m3u8 best alt text

Pomi: view-source:https://goodgame.ru/channel/Pomi/#autoplay Run: livestreamer hls://http://hls.goodgame.ru/hls/pomi.m3u8 best alt text

...: view-source:https://goodgame.ru/channel/.../#autoplay Run: livestreamer hls://http://hls.goodgame.ru/hls/....m3u8 best alt text

flijloku commented 7 years ago

Works, but with interruptions. Perhaps triggered by DDoS protection. I forgot to warn: only "best" quality. @psihkakihmalo use https://yadi.sk/d/-MA5GdyrxbmN7 (not https://github.com/chrippa/livestreamer/pull/1160)

intact commented 7 years ago

You can try #1527

flijloku commented 7 years ago

@intact 'socket.error' Errno 10054

psihkakihmalo commented 7 years ago

flijloku, with this plugin (https://yadi.sk/d/-MA5GdyrxbmN7) (with "best" or another) I was not able to run any streams...

flijloku commented 7 years ago

@psihkakihmalo можешь выложить скрин команды и ошибки?

psihkakihmalo commented 7 years ago

со всеми стримами одно и тоже alt text

alt text

короче для себя я нашел решение (не слишком изящное правда) - напишу себе на delphi прогу-стартер для лайвстримера, она за место плугина сама будет парсить гудгейм (попробовал - работает) и генерить конечную ссылку hls://........m3u8 , а потом уже запускать лайвстример с этой прямой ссылкой. ..как запилю прогу, выложу её тут в Issues, может кому тоже пригодится

intact commented 7 years ago

Can you watch stream through browser?

flijloku commented 7 years ago

@intact Yes of course! @psihkakihmalo жаль, что не идет :( .Я смену качества прикрутил.

psihkakihmalo commented 7 years ago

намучился с этим питоном, нифига мне в нём не понятно как что там можно исправить... зато вот delphi с библиотеками Synapse открывает и парсит защищенные https-страницы только так... на днях займусь, сделаю утилиту, чтоб goodgame.py вообще был не нужен, а всё делалось в обход него...

intact commented 7 years ago

@flijloku can you try plugin with restored DDOS cookie support?

https://gist.github.com/intact/20e9dcc4a8580c33febf5e8a446ded4f

flijloku commented 7 years ago

@intact get the same: 111 And my plugin works for you? Try please(https://yadi.sk/d/-MA5GdyrxbmN7)

intact commented 7 years ago

@flijloku Different https sites works with livestreamer? (eg. Twitch)

flijloku commented 7 years ago

@intact yes: 222

flijloku commented 7 years ago

Probably it would have helped authentication, as was done in the Twitch plugin(https://github.com/chrippa/livestreamer/pull/1483). This is stated in https://github.com/GoodGame/API/blob/master/Streams/v2/authentication.md (unfortunately only in Russian) Page register a new application (personal profile): 333

intact commented 7 years ago

works for me without authentication

livestreamer https://goodgame.ru/channel/Pomi/#autoplay best
[cli][info] Found matching plugin goodgame for URL https://goodgame.ru/channel/Pomi/#autoplay
[cli][info] Available streams: 240p (worst), 480p, 720p, 1080p (best)
[cli][info] Opening stream: 1080p (hls)
[cli][info] Starting player: ffplay
[cli][info] Player closed
[cli][info] Stream ended
flijloku commented 7 years ago

@intact it is your plugin?How about my?

intact commented 7 years ago

@flijloku with your plugin:

livestreamer https://goodgame.ru/channel/Pomi/#autoplay best
[cli][info] Found matching plugin goodgame for URL https://goodgame.ru/channel/Pomi/#autoplay
match <_sre.SRE_Match object; span=(0, 32), match='https://goodgame.ru/channel/Pomi'>
id Pomi
url http://api2.goodgame.ru/streams/Pomi
res <Response [200]>
match <_sre.SRE_Match object; span=(354, 376), match='"gg_player_src":"pomi"'>
[cli][info] Available streams: 240p (worst), 480p, 720p, 1080p (best)
[cli][info] Opening stream: 1080p (hls)
[cli][info] Starting player: ffplay
[cli][info] Player closed
[cli][info] Stream ended
flijloku commented 7 years ago

@intact it works?Yea!

intact commented 7 years ago

@flijloku Yes

For some reason, you cannot acces web page through livestreamer. Maybe some protection?. Maybe they changed DDOS cookie name?

flijloku commented 7 years ago

@intact Unfortunately I do not understand this, so I can not help :(

flijloku commented 7 years ago

@intact I tried both your plugins on Linux(via Oracle VM VirtualBox) and it works! But on windows not work even through vpn(CyberGhost 5)

flijloku commented 7 years ago

@intact I am using for Windows a version "livestreamer-v1.12.2-win32-setup". Our plugins (my, your and psihkakihmalo(corrected)) work for livestreamer on Linux and for https://github.com/streamlink/streamlink/releases (streamlink-0.0.2.exe) on Windows. Now I think the problem is an error (bug or something similar) in the version of the Python library this old livestreamer build. Can you create a pull request for streamlink (maybe leaving unchanged the part relating to DDoS, to avoid problems if inclusion of protection against DDoS on site)? Plugins that I have used (if needed): https://yadi.sk/d/IXmPIBEHxnCZf

intact commented 7 years ago

@flijloku Goodgame accept only TLS https connections (and Python embeded with Windows livestreamer version supports only SSL).