Hi all,
Is there a way to "automate" the process of retreiving mpd links ?
I managed to get the keys of some website content, as well as the mpd links, but the mpd links changes every week for every match... The kid/keys remains the same, only the mpd links are different.
Any clue about that ? I would like to find a way to get the mpd urls automatically, instead of replacing manually the old mpd urls by the new one every week-end.
Thanks!
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 4 of 4
-
Last edited by mathieuthibault; 14th Apr 2023 at 11:57.
-
-
i have wrote a script in python selenium for that, the mostly tokens expires after few hours
so as example
i have a script where i know the mpd url are 5 hours still active. So after 4 hours i login with the script and get the new mpd url
Code:desired_capabilities = DesiredCapabilities.CHROME.copy() logging_prefs = {'performance': 'ALL'} desired_capabilities['goog:loggingPrefs'] = logging_prefs browser = uc.Chrome(options=options, desired_capabilities=desired_capabilities)
[ ... ]
Code:logs = browser.get_log('performance') url_pattern = re.compile(r'https://license\.solocoo\.tv/wv\?c=.*') mpd_url_pattern = re.compile(r'https://nl-bks400-prod05-live.solocoo\.tv/.*\.mpd\b')
[ ... ]
Code:lic_server = None mpd_url = None for log in logs: try: # JSON-String in ein Python-Objekt konvertieren message = json.loads(log['message']) if 'message' in message and url_pattern.match(message['message']['params']['request']['url']): # URL aus Eintrag extrahieren und in Variable speichern url = message['message']['params']['request']['url'] if lic_server is None and url.startswith('https://license.solocoo.tv/wv?c='): lic_server = url elif 'message' in message and mpd_url_pattern.match(message['message']['params']['request']['url']): url2 = message['message']['params']['request']['url'] if 'bpk-token' in url2: if '/keepalive' in url2: mpd_url = url2 else: url2 = url2.replace('.mpd','.mpd/keepalive') mpd_url= url2 else: mpd_url = url2 except: pass # Fehlerhafte Einträge überspringen
in my example, you get now the license server and the mpd. But sure you need to edit that for every site.
EDIT:
But if you grab new mpd links, its better than you grab the new keys too.
So you said the keys are the same, but maybe in nearly future its change, so than you have max a down time of few hours and you dont need to do anything.
if you dont grab the new keys you need to do it manually if change that
EDIT 2:
here a different way:
Code:entries = browser.execute_script("return window.performance.getEntries();") mpd_url = None for entry in entries: try: mpd_url_regex = re.compile(r"https://[^\s]+\.mpd") json_entry = json.dumps(entry) mpd_url_match = mpd_url_regex.search(json_entry) if mpd_url_match: mpd_url = mpd_url_match.group() break except Exception as e: print(e)
Last edited by Haft66; 22nd Apr 2023 at 04:29.
Similar Threads
-
How to find .mpd link?
By sven32 in forum Video Streaming DownloadingReplies: 19Last Post: 10th Dec 2022, 11:40 -
Unprotect mpd link
By parkata in forum Video Streaming DownloadingReplies: 0Last Post: 28th Sep 2022, 15:33 -
How to stream live drm with its url link and license link in pc
By Sandy sai in forum Video Streaming DownloadingReplies: 0Last Post: 23rd Jul 2022, 08:18 -
how get the direct link of live video
By alshathry in forum Video Streaming DownloadingReplies: 2Last Post: 2nd Apr 2022, 10:26 -
I can only find the audio mpd link in this video, help?
By Ninjachado in forum Video Streaming DownloadingReplies: 1Last Post: 3rd Jan 2022, 02:17