streamlink: YuppTV - Invalid captcha token
Plugin Issue
- [x ] This is a plugin issue and I have read the contribution guidelines.
YuppTV seems to have added some sort of login captcha (looks to be Google’s recaptcha) which is preventing logging into the website and getting access to paid/premium streams. Free streams which do not require login still work. I am willing to provide an account temporarily for anyone that might be interested in fixing this. They will need a UK IP during testing.
Reproduction steps / Explicit stream URLs to test
-
Use relevant Streamlink parameters for premium stream requiring login. streamlink --yupptv-email=myemail@gmail.com --yupptv-password=password123 --http-no-ssl-verify https://www.yupptv.com/channels/star-plus-uk/live
-
Failed Login and no stream output.
Log output
**Premium stream requiring login** (Does not work)
C:\Users\*****>streamlink --yupptv-email=myemail@gmail.com --yupptv-password=password123 --http-no-ssl-verify https://www.yupptv.com/channels/star-plus-uk/live --loglevel debug
[cli][debug] OS: Windows 10
[cli][debug] Python: 3.6.6
[cli][debug] Streamlink: 1.5.0
[cli][debug] Requests(2.24.0), Socks(1.7.1), Websocket(0.57.0)
[cli][info] Found matching plugin yupptv for URL https://www.yupptv.com/channels/star-plus-uk/live
[cli][debug] Plugin specific arguments:
[cli][debug] --yupptv-email=myemail@gmail.com (email)
[cli][debug] --yupptv-password=***** (password)
[plugin.yupptv][error] Failed to login: Invalid captcha token (code: 403)
[plugin.yupptv][error] This stream requires you to login
error: No playable streams found on this URL: https://www.yupptv.com/channels/star-plus-uk/live
**Free stream not requiring login** (Does work)
C:\Users\*****>streamlink --http-no-ssl-verify https://www.yupptv.com/channels/aajtak/live best --loglevel debug
[cli][debug] OS: Windows 10
[cli][debug] Python: 3.6.6
[cli][debug] Streamlink: 1.5.0
[cli][debug] Requests(2.24.0), Socks(1.7.1), Websocket(0.57.0)
[cli][info] Found matching plugin yupptv for URL https://www.yupptv.com/channels/aajtak/live
[utils.l10n][debug] Language code: en_GB
[cli][info] Available streams: 216p (worst), 270p, 288p, 396p, 406p (best)
[cli][info] Opening stream: 406p (hls)
[stream.hls][debug] Reloading playlist
[stream.hls][debug] First Sequence: 9065; Last Sequence: 9094
[stream.hls][debug] Start offset: 0; Duration: None; Start Sequence: 9092; End Sequence: None
[stream.hls][debug] Adding segment 9092 to queue
[cli][debug] Pre-buffering 8192 bytes
[stream.hls][debug] Adding segment 9093 to queue
[stream.hls][debug] Adding segment 9094 to queue
[cli][info] Starting player: "C:\Program Files\VideoLAN\VLC\vlc.exe"
[stream.hls][debug] Download of segment 9092 complete
[cli.output][debug] Opening subprocess: "C:\Program Files\VideoLAN\VLC\vlc.exe" --input-title-format https://www.yupptv.com/channels/aajtak/live -
[stream.hls][debug] Download of segment 9093 complete
[cli][debug] Writing stream to output
...
Additional comments, screenshots, etc.
Love Streamlink? Please consider supporting our collective. Thanks!
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 25 (13 by maintainers)
@mkbloke
Took me a while to figure out what was happening, but it seems that after 7 days the cache in the file
plugin-cache.jsonis automatically purged. However, If I re-set the SAME credentials again they will continue working… I have done this 3 times with the same tokens and the only change is theexpiresin theplugin-cache.json file. So it is possibly the expiry date being set in the cache file incorrectly causing the credentials to be purged prematurely?Prior to trying a stream - plugin-cache.json file:
Trying to play a stream and YuppTV credentials are purged automatically from plugin-cache.json:
{}After setting new credentials, new expiry date with same credentials:
I can confirm that we have lift off! Both free and premium stream are working. Thank you very much @mkbloke I will update on how long the tokens take to expire for anyone who is interested in knowing.
To clarify for any others, your commands should be like the following, replacing the random strings
342a4cqwedey4d73andYT-7h2fae6b-u643-5ctc-483f-11856f3b155pwith the appropriate tokens and the stream link of your choosing e.g.streamlink --http-no-ssl-verify -l debug --yupptv-boxid 342a4cqwedey4d73 --yupptv-yuppflixtoken YT-7h2fae6b-u643-5ctc-483f-11856f3b155p https://www.yupptv.com/channels/star-plus-uk/live bestTo get the tokens… use Firefox and log into your YuppTV account, press F12 on your keyboard and go to the Storage tab at the top. You should see the cookies section and go to yupptv.com. Copy the Value of BoxId and YuppflixToken and use them in your streamlink parameters above. Make sure you do not click the logout button on YuppTV website, instead just close it.
The login will only be done if plugin parameters for the email and password are set: https://github.com/streamlink/streamlink/blob/1.5.0/src/streamlink/plugins/yupptv.py#L62-L67
And the login itself only fetches cookies from the login request, which are then stored on the HTTP session for the next requests: https://github.com/streamlink/streamlink/blob/1.5.0/src/streamlink/plugins/yupptv.py#L40-L57
This means that you’ll have to figure out the cookies yourself or set everything your web browser has set via the
--http-cookieor--http-headerparameters. Note that the plugin performs its login up to three times, until all other devices are logged out, as reported by the site.Regarding the plugin’s login parameters themselves, they are now useless due to the new captcha codes added by the streaming site and thus need to be removed, as there is no way around that for Streamlink.
If someone figures out which exact cookies are needed, a new plugin parameter could be added, similar to #2840.