Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add other providre like vodafon3 #17

Closed
marioeivissa opened this issue May 22, 2024 · 8 comments
Closed

add other providre like vodafon3 #17

marioeivissa opened this issue May 22, 2024 · 8 comments
Labels

Comments

@marioeivissa
Copy link

marioeivissa commented May 22, 2024

i think the vodafon3.py should be like this
res = await (await pyfetch(licUrl,
method="POST",
headers=licHeaders,
body=challenge
)).txt()
licence = base64.b64decode(res.encode()) not sure txt or bytes or hex???

using the blockRules.conf and adding the rules for block the licence url because nv-auth tokens is just for one use....and folowing this tutto #12 i dont get any response of keys, anybody can help????

i put in blockRules.conf this
VDS7B9J3/wvls
vds7b9j3.anycast.nagra.com/VDS7B9J3/wvls/contentlicenseservice/v1/licenses

and in headers i need put something like this headers = {
'nv-authorizations': data_value,
'User-Agent': 'OTVMediaPlayer'
} the rest is normal, no special response of license, just license in bytes

i really like this extenxion because i think have very good future, but its very difficult put new providers, i prefer make my own script, i thought this method is going to be easier, but.........i tried another providers but without good results

i put in pre.py in the end of the script this

js.chrome.extension.getBackgroundPage().isBlock=False

and in Vodafon3.py put this in the end
js.chrome.extension.getBackgroundPage().isBlock=True

then botton right and lock url license, and the mpd doesnt play, error, thats right but...

nothing happen, no keys, so maybe im wrong doing the vodafon3.py,

any advice??? thanks

thank in advantage

@marioeivissa
Copy link
Author

the point is vodafon3 i need use one user-agent of the device which i got the cdm in one call, and the user agent of the license is the same like show f12, so if i use switcher user agent addon like in amazon to change the user agent not working because change every user agent even in the license request, so.....dont find the solution

@FoxRefire
Copy link
Owner

licHeaders['User-Agent'] = "User/Agent"

@marioeivissa
Copy link
Author

marioeivissa commented May 29, 2024

one more question mate, and sorry, what about if we use this for one provider:
import urllib.parse
payload = urllib.parse.quote(base64.b64encode(challenge).decode())

licHeaders = {}
licHeaders['Accept-Encoding'] = 'gzip'
licHeaders['Connection'] = 'Keep-Alive'
licHeaders['Content-Length'] = '2131'
licHeaders['Content-Type'] = 'application/octet-stream'
licHeaders['Host'] = 'wv-ottlic-f3.imagenio.telefonica.net'
licHeaders['nv-authorizations'] = ('')
licHeaders['User-Agent'] = 'Exoplayer-Android-Movilidad'

res = await js.corsFetch(licUrl, "POST", json.dumps(licHeaders), payload)
licence = base64.b64decode(res.encode())

the question is, how the extension can use the nv-auth than the explorer give to us??????or how we can use only the headers we want???because i just need this ones, no the rest, and not working for me, just charge this headers but some also are charger in the request, why?

@FoxRefire
Copy link
Owner

Under normal circumstances, headers are automatically captured by the extension, so there is no need to reconfigure them from scratch.
If you changed only the UA and used the token captured by the extension, did it not work?
In that case, it is necessary to identify the API that issues the token and obtain it again from there.

@marioeivissa
Copy link
Author

marioeivissa commented Jun 6, 2024

En circunstancias normales, la extensión captura automáticamente los encabezados, por lo que no es necesario reconfigurarlos desde cero. Si cambiaste solo la UA y usaste el token capturado por la extensión, ¿no funcionó? En ese caso, es necesario identificar la API que emite el token y obtenerlo nuevamente desde allí.

correct! i need api id for dont confuse to the license response, in the request there are the id of your api not from the real api, thats is the problem then, how can i say to the extension use the api id correctly???? using new token and adding not working
also mate, because we are sending in the headers your api id, not the real one, i think thats is the problem

using normal script for get keys work perfectly, so....nv auth is not the problem

using for movist3r just this:
licHeaders['User-Agent'] = "Exoplayer-Android-Movilidad"
licence = await (await pyfetch(licUrl,
method="POST",
headers=licHeaders,
body=challange
)).bytes()
not working, i think because in the request there are api id than is the cause of the problems maybe

@FoxRefire
Copy link
Owner

Try corsFetch

@marioeivissa
Copy link
Author

Prueba corsFetch

licHeaders['User-Agent'] = "Exoplayer-Android-Movilidad"
res = await js.corsFetch(licUrl, "POST", headers=licHeaders).bytes() now doesnt take the header i want???!!!!

@FoxRefire
Copy link
Owner

Squashed with #44

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants