Hello I'm trying a way to add this free italian channel on my ott nav playlist.
https://www.discoveryplus.com/it/channel/nove?pc=311
the issue I'm facing (sorry if I'm a noob I'm seriously willing to learn) is that the url expires each 24h I believe so I have to manually retrieve it each time and add it again into the playlist. Is there a way to make OTT nav automatically retrieve the url without having to add it every 24h?
Thanks in advance for your help and sorry again if th question is too NOOBish.
Support our site by donate $5 directly to us Thanks!!!
Try StreamFab Downloader and download streaming video from Netflix, Amazon!
Try StreamFab Downloader and download streaming video from Netflix, Amazon!
+ Reply to Thread
Results 1 to 20 of 20
-
-
Find mpd link
this is the key
Code:76933515b27b4ae285f1d976d1e19e75:ab21b257363af1b93d50f653b4a8e1df
save with .m3u extension
Code:#EXTM3U #EXTINF:-1 ,CHANNEL NAME #KODIPROP:inputstream.adaptive.license_type=clearkey #KODIPROP:inputstream.adaptive.license_key=76933515b27b4ae285f1d976d1e19e75:ab21b257363af1b93d50f653b4a8e1df mpd_link
-
i think he dont need the key, he just want a script/method to auto generate mpd or mpd token from its api.
-
-
-
Thanks for the answer sir. I already had all this and I could successfully retrieve the key. I'm struggling now in creating the script with replit or chatgpt since I'm sure I have some parts missing and I'm still not getting how this all works to retrieve a mpd url thorugh a script and then make it work automatically with ott navigator.
-
Code:
import json from urllib.parse import urlparse, parse_qs import requests GLOBAL_API = 'https://global-prod.disco-api.com/bootstrapInfo' ST_COOKIE = "<ST_COOKIE>" def get_base_api_url(): return json.loads( requests.get(GLOBAL_API, headers={ 'x-disco-client': '0:0:0:0', 'x-disco-params': 'bid=dplus', }).content.decode() )["data"]["attributes"]["baseApiUrl"] BASE_API_URL = get_base_api_url() def get_mpd(input_url): response_json = json.loads(requests.post( BASE_API_URL + '/playback/v3/channelPlaybackInfo', cookies={'st': ST_COOKIE}, json={ 'channelId': parse_qs(urlparse(input_url).query).get("pc")[0], 'wisteriaProperties': {'device': {'browser': {'name': 'chrome'}}}, 'deviceInfo': {'adBlocker': False} } ).content.decode()) mpd_urls = [] for u in response_json["data"]["attributes"]["streaming"]: mpd_urls += [u["url"]] return mpd_urls print(get_mpd("https://www.discoveryplus.com/it/channel/nove?pc=311"))
--[----->+<]>.++++++++++++.---.--------.
[*drm mass downloader: widefrog*]~~~~~~~~~~~[*how to make your own mass downloader: guide*] -
Alright. Turns out it was relatively easy due to their neat API. You can actually get the token yourself which is nice. This is the final script. Was fun to figure it out.
Code:import json from urllib.parse import urlparse, parse_qs import requests GLOBAL_API = 'https://global-prod.disco-api.com/bootstrapInfo' def get_base_api_url(): return json.loads(requests.get(GLOBAL_API, headers={ 'x-disco-client': '0:0:0:0', 'x-disco-params': 'bid=dplus' }).content.decode())["data"]["attributes"]["baseApiUrl"] def get_st(): return json.loads(requests.get(BASE_API_URL + '/token', params={ 'realm': 'dplay', 'shortlived': 'false', 'deviceId': 'deviceId' }).content.decode())["data"]["attributes"]["token"] BASE_API_URL = get_base_api_url() ST_COOKIE = get_st() def get_mpd(input_url): response_json = json.loads(requests.post( BASE_API_URL + '/playback/v3/channelPlaybackInfo', cookies={'st': ST_COOKIE}, json={ 'channelId': parse_qs(urlparse(input_url).query).get("pc")[0], 'wisteriaProperties': {'device': {'browser': {'name': 'chrome'}}}, 'deviceInfo': {'adBlocker': False} } ).content.decode()) mpd_urls = [] for u in response_json["data"]["attributes"]["streaming"]: mpd_urls += [u["url"]] return mpd_urls print(get_mpd("https://www.discoveryplus.com/it/channel/nove?pc=311")) print(get_mpd("https://www.discoveryplus.com/it/channel/nove?pc=312"))
Last edited by 2nHxWW6GkN1l916N3ayz8HQoi; 5th Mar 2024 at 15:52.
--[----->+<]>.++++++++++++.---.--------.
[*drm mass downloader: widefrog*]~~~~~~~~~~~[*how to make your own mass downloader: guide*] -
Mate, thanks a ot for your kind answer. As always you are really helpful and exhaustive in your answers. I will study the code and try to understand where I was lacking info. You helped me so much, a true gentleman.
i will find a way to incorporate it in ott nav and try to apply this to other channels and in the future my goal is to create my own personal script -
To make it work for me I had to replace with this part
HTML Code:def get_base_api_url(): return json.loads(requests.get(GLOBAL_API, headers={ 'x-disco-client': 'WEB:UNKNOWN:dplus_us:2.39.1', 'x-disco-params': 'bid=dplus,hn=www.discoveryplus.com,hth=it', }).content.decode())["data"]["attributes"]["baseApiUrl"]
-
Ok I've successfully converted the script to PHP and it works properly.
Now I'm trying to add it to OTT Navigator to make it retrieve the URL automatically.
I'm trying this method but it doesn't seem to work. Is there something wrong? The player (which is based on exoplayer I think) it doesn't seem to retrieve the url from the script. I already made sure that the script returns a proper working link with no brackets or commas. Any ideas?
Code:#EXTINF:-1 group-title="*" tvg-logo="*" tvg-id="*",Channel Name #KODIPROP:inputstream.adaptive.license_type=org.w3.clearkey #KODIPROP:inputstream.adaptive.license_key=kid_key https://0.0.0.0/myscript.php
-
Hi mate sorry for bothering you again,
May you please explain how did you figure that out?
I'm missing this part
Code:def get_st(): return json.loads(requests.get(BASE_API_URL + '/token', params={ 'realm': 'dplay', 'shortlived': 'false', 'deviceId': 'deviceId' }).content.decode())["data"]["attributes"]["token"]
I'm trying to study their API but i don't see any token attribute? -
That token value is kept as a cookie. Naturally, because you can access that video without an account, it means that the endpoint token must be called at most once. Keyword, at most once, because it is kept as a cookie so that the next time you access that page, the endpoint isn't called anymore. So open incognito on an empty tab, open inspect network requests, and access that page. You will see the token endpoint called only once. The next time you refresh the page, it's gone.
Last edited by 2nHxWW6GkN1l916N3ayz8HQoi; 9th Mar 2024 at 06:34.
--[----->+<]>.++++++++++++.---.--------.
[*drm mass downloader: widefrog*]~~~~~~~~~~~[*how to make your own mass downloader: guide*] -
Does anyone know how to modify the script for links like:
https://www.discoveryplus.com/it/video/chissa-chi-e/stagione-1-episodio-1
From Firefox's Web Developer Tools (F12) it follow that
channelId = 311
videoId = 7523412
and a mpd url like to this
https://dplus-it-cloudfront.prod-vod.h264.io/s/eu-west-1/v1/playlist/dash/5d132ad5-142...pm5LIyUDKWkgI=
but I couldn't find how to change the requests.post() to get it. -
That script is old and meant for /channel links. For a good discoveryplus script, use devine. I don't have access to discovery and can't edit the script anyway
--[----->+<]>.++++++++++++.---.--------.
[*drm mass downloader: widefrog*]~~~~~~~~~~~[*how to make your own mass downloader: guide*] -
It's simple
Code:04.10.2024 9:20:44,66 yt-dlp_x86 -F https://www.discoveryplus.com/it/video/chissa-chi-e/stagione-1-episodio-1 [DiscoveryPlusItaly] Extracting URL: https://www.discoveryplus.com/it/video/chissa-chi-e/stagione-1-episodio-1 [DiscoveryPlusItaly] chissa-chi-e/stagione-1-episodio-1: Downloading token [DiscoveryPlusItaly] chissa-chi-e/stagione-1-episodio-1: Downloading JSON metadata [DiscoveryPlusItaly] 7513098: Downloading JSON metadata [DiscoveryPlusItaly] chissa-chi-e/stagione-1-episodio-1: Downloading m3u8 information [info] Available formats for 7513098: ID EXT RESOLUTION FPS │ FILESIZE TBR PROTO │ VCODEC VBR ACODEC MORE INFO ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────── hls-audio-aacl-125-Italian mp4 audio only │ m3u8 │ audio only unknown [it] Italian hls-300 mp4 416x234 25 │ ~137.37MiB 300k m3u8 │ avc1.4D400D 300k video only hls-434 mp4 640x360 25 │ ~198.73MiB 434k m3u8 │ avc1.4D401E 434k video only hls-599 mp4 768x432 25 │ ~274.28MiB 599k m3u8 │ avc1.4D401E 599k video only hls-1015 mp4 1280x720 25 │ ~464.77MiB 1015k m3u8 │ avc1.4D401F 1015k video only hls-1737 mp4 1280x720 25 │ ~795.38MiB 1737k m3u8 │ avc1.4D401F 1737k video only hls-2919 mp4 1280x720 25 │ ~ 1.31GiB 2919k m3u8 │ avc1.4D401F 2919k video only hls-5583 mp4 1920x1080 25 │ ~ 2.50GiB 5583k m3u8 │ avc1.4D4028 5583k video only hls-10099 mp4 1920x1080 25 │ ~ 4.52GiB 10099k m3u8 │ avc1.4D4028 10099k video only
-
Thanks for the advice. My intention was to make a simple standalone script.
Taking inspiration from the script of 2nHxWW6GkN1l916N3ayz8HQoi and from yt-dlp source I put together these few lines of code (in case they can be useful to someone).
Code:import requests import json videoId = '7523412' ST_COOKIE = requests.get('https://eu1-prod.disco-api.com/token', params={'realm': 'dplay','shortlived': False,'deviceId': 'deviceId'}).json()["data"]["attributes"]["token"] data = {'deviceInfo': {'adBlocker': False,'drmSupported': True}, 'wisteriaProperties': {}, 'videoId': videoId} response = requests.post('https://eu1-prod.disco-api.com/playback/v3/videoPlaybackInfo', json=data, cookies={'st': ST_COOKIE}).json() dashUrl = response['data']['attributes']['streaming'][0]['url'] print(f'\nDASHURL:\n{dashUrl}\n')
Starting from videoId it provides the manifest url m3u8.
Looking with Firefox Web Developer Tools (F12) somewhere there is also the manifest mpd, but I don't know how to get it. -
--[----->+<]>.++++++++++++.---.--------.
[*drm mass downloader: widefrog*]~~~~~~~~~~~[*how to make your own mass downloader: guide*] -
You are right. However your script seems better to me.
Modifying it this way gives m3u8 url
Code:BASE_API_URL + '/playback/v3/videoPlaybackInfo', cookies={'st': ST_COOKIE}, json={ 'videoId': videoId, 'wisteriaProperties': {}, 'deviceInfo': {'adBlocker': False} }
Instead this way you get mpd Url
Code:BASE_API_URL + '/playback/v3/videoPlaybackInfo', cookies={'st': ST_COOKIE}, json={ 'videoId': videoId, 'wisteriaProperties': {'device': {'browser': {'name': 'chrome'}}}, 'deviceInfo': {'adBlocker': False} }
I don't understand so much about this things, I just did some random testing. -
I used a combination of the scripts above. Does anyone know how to only recieve mpd links from akamai using https://prod-gb-live.akamai.prod-live.h264.io i get a mixture of them and https://gb-sports-cloudfront.prod-live.h264.io.
The akamai seem more stable for me.
Thanks
Similar Threads
-
now tv free channel with DRM
By nntvcloud in forum Video Streaming DownloadingReplies: 1Last Post: 11th Jan 2024, 04:49 -
Using Vimeo OTT
By AprilDDD in forum Newbie / General discussionsReplies: 0Last Post: 18th Sep 2023, 09:09 -
how to download video channel on vix free
By rich js in forum Video Streaming DownloadingReplies: 14Last Post: 30th Jun 2023, 17:17 -
Repairing the timestamps of an IPTV/OTT H264 TS file?
By RedPenguin in forum EditingReplies: 5Last Post: 5th Aug 2020, 15:02 -
[HELP] Download from Vimeo OTT
By ozzy2k11 in forum Video Streaming DownloadingReplies: 0Last Post: 30th Jun 2020, 05:51