Unified yt-dlp downloader - generates cross-platform Python scripts for video, audio, subtitles
< Feedback on yt-dlp Python-Downloader
Hi, thank you for the kind words and great questions! Both features you requested have been implemented in the latest version (v9.53). Here's where to find everything:
The script now includes a built-in cookie export feature.
How to use it:
Manual export: Right-click the script icon → click "🍪 Export Cookies" in the context menu. This downloads a %domain%_cookies.txt file in Netscape format (which is what yt-dlp expects for --cookies).
Automatic export: Right-click the script icon → right-click "☕ Support" → enable "Auto Export Cookies" in the Secret Extras menu. With this enabled, every time you click the download button, both the .py script and the cookie file are exported together automatically.
Honest note about this feature:
This is a newly integrated feature using the GM_cookie API provided by the userscript manager. I've confirmed it exports cookies, but I haven't been able to thoroughly test whether the exported cookies are sufficient for all use cases (e.g., age-restricted or login-required content). The GM_cookie API may not have access to all cookie types (such as HttpOnly or certain Secure-flagged cookies) due to browser security restrictions — which could mean the export is incomplete compared to what a dedicated cookie extension provides. I simply don't know yet how well it works in practice across different scenarios.
My recommendation for now:
If you need cookies for authenticated downloads and the built-in export doesn't work for your case, continue using a dedicated browser extension like "Get cookies.txt LOCALLY". These extensions have deeper browser-level access and are proven to work. Just place the exported file in the same directory as the .py script, named %domain%_cookies.txt (e.g., www.youtube.com_cookies.txt). The generated scripts automatically detect and use it.
I'd appreciate hearing back whether the built-in cookie export works for your use case — it helps me understand the real-world limitations.
Userscript manager compatibility:
GM_cookie API was only recently merged into Violentmonkey's codebase, but the published browser extension hasn't been updated to include it yet. Until a new release is published, you'll see an error like "GM_cookie API not available."Yes, this is implemented. The generated Python scripts are fully standalone — they run completely independently of the browser, even after you close it.
To enable auto-cleanup:
.py script deletes itself after successful executionThis way you can click, run the script, and both files clean themselves up when done.
Note: The files are only deleted after a successful run. If something fails, they're preserved so you can troubleshoot or retry.
| Feature | Location |
|---|---|
| Manual cookie export | Context menu → "🍪 Export Cookies" |
| Auto cookie export | Secret Extras → "Auto Export Cookies" |
| Auto-delete .py after run | Secret Extras → "Delete Py After Run" |
| Auto-delete cookies after run | Secret Extras → "Delete Cookie After Run" |
| Secret Extras menu | Right-click "☕ Support" in the context menu |
Hope this helps — and feedback on the cookie export is very welcome!
Hello,
I am very impressed with your skills and good will.
So far, i managed to check your updated script on the YT platform.
Everything works and smokes ;)
The %domain%_cookies.txt file is created, processed and finally deleted together with the *.py file.
Awesome! You helped me a lot and made my life easier.
Thank you again for your work!
Glad it worked for you!
For my future reference:
Quick follow-up on the cookie export — great news after deeper investigation:
The built-in cookie export is fully functional and can produce a complete cookie file equivalent to a dedicated extension. The earlier test that showed fewer cookies was simply because a setting needed to be enabled. After enabling it, I compared both exports side-by-side — same cookies, same values, same authentication tokens.
One-time setup required in your userscript manager:
(Note: Violentmonkey requires enabling this both globally AND per-script.)
After that, the "🍪 Export Cookies" button (or the "Auto Export Cookies" option in Secret Extras) will export the full cookie set including all authentication cookies needed for age-restricted, private, and members-only content. No separate cookie extension required.
Hello again,
1. Do the permissions of the browser (in my case Firefox) allow you to export cookies from the current tab to a file with the required name "%domain%_cookies.txt", but only after clicking the trigger (your script icon)? In short: clicking the trigger exports the *.py file and "%domain%_cookies.txt". Sorry for my inquisitiveness, but you made a great script, and cookies sometimes help download media.
2. Will the exported scripts run even when the browser is closed? Why am I asking? I run *.py files immediately and then I don't need them. Is it possible to add the option to delete *.py files when closing the browser or after pressing a new button in your script?
I'm afraid that again the browser permissions won't allow it.
Thanks for your work.