Hello.
https://www.nowehoryzonty.pl/vod-film.s?id=14019&vb=kdv#play
here's a site with some free videos but all i get in requests is a vp9 mpd.
is there any trick to get h264 mpd from this site ?
videos are free, you only need to login (polish ip might be needed)
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays!
Try StreamFab Downloader and download streaming video from Youtube, Netflix, Amazon! Download free trial.
+ Reply to Thread
Results 1 to 12 of 12
Thread
-
-
Code:
N_m3u8DL-RE "https://1827693967.rsc.cdn77.org/r/kdvod/2024/SNEAKPEAK_FESTIWALOWY__CZESC_LATO/04_09_24_1648_m4a/h264.mpd" --key f10f4b6fecd33c3ca26612310bdc9691:94640f195bed82c349f41b46a18925f2 -M format=mkv
--[----->+<]>.++++++++++++.---.--------.
[*drm mass downloader: widefrog*]~~~[*how to make your own mass downloader: guide*] -
which browser did you use to find this url ?
looks like it's not only the filename is different but also host
vp9 are hosted hereCode:https://1104682167.rsc.cdn77.org/r/kdvod/2024/SNEAKPEAK_FESTIWALOWY__CZESC_LATO/04_09_24_1648_m4a/vp9.mpd
Code:https://1827693967.rsc.cdn77.org/r/kdvod/2024/SNEAKPEAK_FESTIWALOWY__CZESC_LATO/04_09_24_1648_m4a/h264.mpd
Last edited by monk87; 29th Sep 2024 at 01:15.
-
I didn't really find the URL. Mostly guessed it.
For Firefox I got this playing mpd
Code:https://1104682167.rsc.cdn77.org/r/kdvod/2024/SNEAKPEAK_FESTIWALOWY__CZESC_LATO/04_09_24_1648_m4a/vp9.mpd?secure=<value>==,<value>
Code:https://1827693967.rsc.cdn77.org/r/kdvod/2021/NH_VOD_3.0.2/30_11_23_1739_56s/vp9.mpd
Code:https://1827693967.rsc.cdn77.org/r/kdvod/2021/NH_VOD_3.0.2/30_11_23_1739_56s/h264.mpd
Code:https://1104682167.rsc.cdn77.org/r/kdvod/2024/SNEAKPEAK_FESTIWALOWY__CZESC_LATO/04_09_24_1648_m4a/vp9.mpd?secure=<value>==,<value> https://1827693967.rsc.cdn77.org/r/kdvod/2021/NH_VOD_3.0.2/30_11_23_1739_56s/h264.mpd
Code:https://1827693967.rsc.cdn77.org/r/kdvod/2024/SNEAKPEAK_FESTIWALOWY__CZESC_LATO/04_09_24_1648_m4a/h264.mpd
It is a kinda convoluted solution. Maybe someone else knows an easier solution.--[----->+<]>.++++++++++++.---.--------.
[*drm mass downloader: widefrog*]~~~[*how to make your own mass downloader: guide*] -
No mater what, it still is a working solution
I have tried to automate this sh... but failed miserably
Code:import asyncio from playwright.async_api import async_playwright async def run(playwright): browser = await playwright.firefox.launch(headless=False, devtools=True) context = await browser.new_context() page = await context.new_page() await page.goto("https://www.nowehoryzonty.pl") post_data = { 'login': 'FREE_LOGIN', # Replace with actual login 'passwd': 'PASS', # Replace with actual password 'location': 'https://www.nowehoryzonty.pl/vod-film.s?id=14020&vb=kdv', 'gidtoken': '' # Keep empty or dynamically filled if needed } response = await page.evaluate(''' async (post_data) => { const response = await fetch('https://www.nowehoryzonty.pl/loguj.do', { method: 'POST', headers: { 'Content-Type': 'application/x-www-form-urlencoded' }, body: new URLSearchParams(post_data) }); const responseText = await response.text(); return { status: response.status, body: responseText, url: response.url }; } ''', post_data) await page.goto("https://www.nowehoryzonty.pl/vod-film.s?id=14020&vb=kdv") await page.wait_for_selector('div.play-action', state='visible') await page.click('div.play-action') await asyncio.sleep(15) await browser.close() async def main(): async with async_playwright() as playwright: await run(playwright) asyncio.run(main())
Looks like firefox launched without widevine support.
Tried to make it work with no luck.
Any ides ? -
launch playwright like this:
Code:playwright.firefox.launch_persistent_context( user_data_dir="profile", headless=True )
-
Code:
import json import re import browser_cookie3 import requests ACCOUNT_COOKIES = None def set_account_cookies(): global ACCOUNT_COOKIES ACCOUNT_COOKIES = {} for c in browser_cookie3.firefox(domain_name='nowehoryzonty.pl'): ACCOUNT_COOKIES[c.name] = c.value def get_manifests(source_url): source_url = source_url.replace("vod-film.s", "video.s") response = requests.get(source_url, cookies=ACCOUNT_COOKIES) response = response.content.decode() if "Najpierw musisz się zalogować" in response: raise "Log into your account using Firefox browser and run the script again" if "Film dostępny tylko na terenie Polski" in response: raise "Polish IP needed" response = re.findall(r'filminfo[^=]*=[^{]*({.*?});', response) response = json.loads(response[0]) base_manifest = response["url"] + response.get("next", {}).get("urlSuffix", response["urlSuffix"]) h264 = base_manifest + "h264.mpd" vp9 = base_manifest + "vp9.mpd" if 200 <= requests.get(h264).status_code < 300: print("h264: ", h264) if 200 <= requests.get(vp9).status_code < 300: print("vp9: ", vp9) SOURCE_URLS = [ "https://www.nowehoryzonty.pl/vod-film.s?id=14020&vb=kdv", "https://www.nowehoryzonty.pl/vod-film.s?id=14019&vb=kdv#play", "https://www.nowehoryzonty.pl/vod-film.s?id=13226&vb=kdv", ] if __name__ == '__main__': if ACCOUNT_COOKIES is None: set_account_cookies() for s in SOURCE_URLS: print(s) get_manifests(s) print("------\n")
Code:https://www.nowehoryzonty.pl/vod-film.s?id=14020&vb=kdv h264: https://1827693967.rsc.cdn77.org/r/kdvod/2024/SNEAKPEAK_FESTIWALOWY__DZIEWCZYNKA_Z_ZAJETYMI_OCZAMI/05_09_24_1436_4w2/h264.mpd ------ https://www.nowehoryzonty.pl/vod-film.s?id=14019&vb=kdv#play h264: https://1827693967.rsc.cdn77.org/r/kdvod/2024/SNEAKPEAK_FESTIWALOWY__CZESC_LATO/04_09_24_1648_m4a/h264.mpd vp9: https://1827693967.rsc.cdn77.org/r/kdvod/2024/SNEAKPEAK_FESTIWALOWY__CZESC_LATO/04_09_24_1648_m4a/vp9.mpd ------ https://www.nowehoryzonty.pl/vod-film.s?id=13226&vb=kdv h264: https://1827693967.rsc.cdn77.org/r/kdvod/2023/WARSZTAT_ANIMACJA_PLASTELINOWA/22_09_23_0859_4aj/h264.mpd vp9: https://1827693967.rsc.cdn77.org/r/kdvod/2023/WARSZTAT_ANIMACJA_PLASTELINOWA/22_09_23_0859_4aj/vp9.mpd ------
Last edited by 2nHxWW6GkN1l916N3ayz8HQoi; 8th Oct 2024 at 14:03. Reason: Edit: forgot to skip the intro to get the real manifest
--[----->+<]>.++++++++++++.---.--------.
[*drm mass downloader: widefrog*]~~~[*how to make your own mass downloader: guide*] -
-
You don't have to. Copy as fetch is just handy because all of the required headers/cookies/payload data is in one place (the clipboard).
We don't need this here because we already have a request object:
You can take a look at the page request listener https://playwright.dev/python/docs/api/class-page#page-event-request, which gives examples on how to use page events -
Ok i managed to make it work automatically
my approach is tricky but i'm more js than python so that's how it is
Code:const { firefox } = require('playwright'); const fs = require('fs'); const path = require('path'); const outputDir = path.join(__dirname, 'HellYesGui'); const { spawn } = require('child_process'); function runPythonScript(scriptPath) { const scriptDir = path.dirname(scriptPath); // Get the directory of the script const scriptName = path.basename(scriptPath); // Get the script file name // Spawn a new process const pythonProcess = spawn('python', [scriptName], { cwd: scriptDir }); // Handle output from the script pythonProcess.stdout.on('data', (data) => { console.log(`Script output: ${data}`); }); // Handle errors from the script pythonProcess.stderr.on('data', (data) => { console.error(`Script error output: ${data}`); }); // Handle script exit pythonProcess.on('close', (code) => { console.log(`Script finished with exit code ${code}`); }); } // Helper function to construct the curl command function requestToCurl(request) { const method = request.method(); const url = request.url(); const headers = request.headers(); const postData = request.postData(); // Initialize curl command let curlCommand = `curl '${url}'`; // Add headers to curl command with line breaks for (const [key, value] of Object.entries(headers)) { if (key.toLowerCase() === 'content-length') { continue; // Skip this iteration } curlCommand += ` \\\n -H '${key}: ${value}'`; } return curlCommand; } // Function to load cookies from a JSON file async function loadCookiesFromFile(context, filePath) { if (fs.existsSync(filePath)) { const cookies = JSON.parse(fs.readFileSync(filePath, 'utf-8')); await context.addCookies(cookies); console.log('Cookies loaded from:', filePath); } else { console.log('Cookie file not found.'); } } (async () => { // Path to the profile directory const profileDir = 'profile'; // Adjust if needed // Path to the cookies file const cookiesFile = 'cookies.json'; // JSON file containing cookies // Launch Firefox with the persistent context using the existing profile const context = await firefox.launchPersistentContext(profileDir, { headless: false, // Set to true for headless mode, userAgent: 'Mozilla/5.0 (iPad; CPU OS 17_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) EdgiOS/129.0.2792.58 Version/17.0 Mobile/15E148 Safari/604.1' }); // Load cookies from the file await loadCookiesFromFile(context, cookiesFile); // Open a new page or get the first one if it already exists const page = context.pages[0] || await context.newPage(); // Intercept requests and look for specific POST and .mpd requests await context.route('**/*', async (route, request) => { const url = request.url(); // Check if the request is a POST to the Widevine license URL if (request.method() === 'POST' && url === 'https://lic.drmtoday.com/license-proxy-widevine/cenc/?specConform=true') { console.log('Intercepted POST request to:', url); // Construct the curl command const curlCommand = requestToCurl(request); // Save the curl command to a file const curlFilePath = path.join(outputDir, 'request_curl.txt'); fs.writeFileSync(curlFilePath, curlCommand, 'utf8'); console.log('Saved curl command for license request to', curlFilePath); // Continue with the request await route.continue(); } // Check if the request URL contains ".mpd" else if (url.includes('.mpd')) { console.log('Intercepted .mpd request to:', url); // Construct the curl command const mpdFilePath = path.join(outputDir, 'mpd_url.txt'); fs.writeFileSync(mpdFilePath, url, 'utf8'); console.log('Saved curl command for .mpd request to', mpdFilePath); // Continue with the request await route.continue(); } else { // Continue with all other requests await route.continue(); } }); // Navigate to the specified URL await page.goto('https://www.nowehoryzonty.pl/vod-film.s?id=14020&vb=kdv'); // Click the play-action button console.log('Waiting for play-action element to appear...'); await page.waitForSelector('div.play-action', { state: 'visible' }); console.log('play-action element is visible. Clicking the element...'); await page.click('div.play-action'); // Wait for 5 seconds after the click console.log('Waiting for 5 seconds...'); const title = await page.title(); const firstPartOfTitle = title.split('|')[0].trim(); const titleFilePath = path.join(outputDir, 'title.txt'); console.log('First part of the title:', firstPartOfTitle); fs.writeFileSync(titleFilePath, firstPartOfTitle, 'utf8'); console.log('First part of the title saved to', titleFilePath); await new Promise(resolve => setTimeout(resolve, 5000)); // Close the context (this closes the browser) await context.close(); runPythonScript('HellYesGui/allhell3.py'); })().catch(err => { console.error('Error:', err); });
+ i modified allhell3.py to load data from those files and use '-sa best -sv best' to remove all the user needed input
but well
apparently the command generated fails...
N_m3u8DL-RE 'https://1827693967.rsc.cdn77.org/r/kdvod/2024/SNEAKPEAK_FESTIWALOWY__DZIEWCZYNKA_Z_ZAJETYMI_OCZA MI/05_09_24_1436_4w2/h264.mpd' --key a92f733652bd336fbbfad623d1c72286:935187216b20e244b 7459f554200d78e --save-name d -mt -M:format=mp4
gives 00:29:40.713 ERROR: Object reference not set to an instance of an object.
what could be wrong ?
Edit: the problem was with ' character...
Sorry, it was lateLast edited by monk87; 9th Oct 2024 at 00:41.
-
run the command with
Code:--log-level DEBUG
-
the problem was with ' character...
so instead of
Code:N_m3u8DL-RE 'https://1827693967.rsc.cdn77.org/r/kdvod/2024/SNEAKPEAK_FESTIWALOWY__DZIEWCZYNKA_Z_ZAJETYMI_OCZAMI/05_09_24_1436_4w2/h264.mpd' --key a92f733652bd336fbbfad623d1c72286:935187216b20e244b7459f554200d78e -M:format=mp4
Code:N_m3u8DL-RE "https://1827693967.rsc.cdn77.org/r/kdvod/2024/SNEAKPEAK_FESTIWALOWY__DZIEWCZYNKA_Z_ZAJETYMI_OCZAMI/05_09_24_1436_4w2/h264.mpd" --key a92f733652bd336fbbfad623d1c72286:935187216b20e244b7459f554200d78e -M:format=mp4
Similar Threads
-
Convert drm mpd source to simple mpd or m3u8 without drm.
By alberto404 in forum Newbie / General discussionsReplies: 0Last Post: 5th Aug 2023, 11:05 -
How to download from zee5 site and download mpd link
By qasem1368 in forum Video Streaming DownloadingReplies: 7Last Post: 25th Nov 2021, 21:28 -
yt-dlp error "HTTP Error 403: Forbidden". MPD downloading [ABC.com site]
By nikshell29 in forum Video Streaming DownloadingReplies: 5Last Post: 26th Aug 2021, 15:18 -
Site Changed From m3u8 to mpd List
By SoConfused in forum Video Streaming DownloadingReplies: 1Last Post: 21st Apr 2021, 13:15 -
Please teach me how to download videos from this site (MPD/dash stream)
By ConTroll in forum Video Streaming DownloadingReplies: 3Last Post: 1st May 2020, 02:14