0

I want to make a script that allows me to download videos from an online streaming service. For that I need to make a http POST request to an url with the parameters acceptVideo, t and s, like this: https://apivoyo.cms.protvplus.ro/api/v1/content/episode-78563/plays?acceptVideo=hls,dai,dash,drm-widevine&t=2024-02-20T19:02:18+02:00&s=6075e5e57b2dde8082037734da1fed02. The t parameter is the time, but I can't figure out how s is being generated. I analyzed the network traffic but I couldn't find any trace of s except for this request. I unpacked the .apk (this is the app) and found a smali file referencing to s:

    .param p9    # Ljava/lang/String;
    .annotation runtime Lretrofit2/http/Query;
        value = "s"
    .end annotation
.end param

I've done some testing, and found out that s is only valid for a minute, after that I get a HTTP 403 Error. It also seems that s is somehow related to t, since modifying t also yields a 403 Error. I probably need to dig deeper, but I don't know what to do next. Any help would be greatly appreciated

2
  • It could well be some kind of token/hash/checksum etc. but it's difficult to say without digging into the code. When you watch other videos, do the s parameters look similar at all or are they totally random? If you can view videos on their website rather than the app, it might be easier to use browser debugging tools to look through their JavaScript. Feb 22 at 16:46
  • @user7290573 The token is always 32 characters long, but it is random every time. I ended up using the requests made by the webpage to extract the Information I needed, however this method is more complicated than using the API. Feb 22 at 17:35

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.