mirror of
https://github.com/SDraw/ml_mods_cvr.git
synced 2026-05-03 17:07:00 +00:00
3.8 KiB
3.8 KiB
Video Player Cookies
This mod allows yt-dlp to use cookies for playing YouTube videos.
Installation
- Install latest MelonLoader
- Get latest release DLL:
- Put
VideoPlayerCookies.dllinModsfolder of game
- Put
Usage
Available mod's settings in Settings - General - Video Player Cookies:
- Enabled: Whether this mod adds cookie parameters or not;
trueby default. - Cookie fetch mode: cookies fetch method;
Cookie text fileby default.- Cookie text file (default) fetches cookies from your
cookies.txtfile, check How to create cookies.txt - Browser Firefox fetches cookies directly from FireFox browser. requires to be logged-in on YouTube in FireFox
- Browser Brave fetches cookies directly from Brave browser. requires to be logged-in on YouTube in Brave
- Browser Chrome fetches cookies directly from Chrome browser. requires to be logged-in on YouTube in Chrome
- Browser Chromium fetches cookies directly from Chromium browser. requires to be logged-in on YouTube in Chromium
- Browser Edge fetches cookies directly from Edge browser. requires to be logged-in on YouTube in Edge
- Browser Opera fetches cookies directly from Opera browser. requires to be logged-in on YouTube in Opera
- Browser Safari fetches cookies directly from Safari browser. requires to be logged-in on YouTube in Safari
- Browser Vivaldi fetches cookies directly from Vivaldi browser. requires to be logged-in on YouTube in Vivaldi
- Browser Whale fetches cookies directly from Whale browser. requires to be logged-in on YouTube in Whale
- Cookie text file (default) fetches cookies from your
How to create cookies.txt
- Acquire cookies for YouTube from your browser:
- Chromium-based browsers: Get cookies.txt LOCALLY extension
- Firefox-based browsers: cookies.txt extension
- Save result as file named
cookies.txtin<game_folder>/UserDatafolder
How to make it work on Linux (Tested on CachyOS / Arch with Firefox)
Because of Linux / Proton, the cookies.txt doesn't seem to work well, instead it's better to use browser mode, the following tutorial explains how to set it up (tested using Firefox)
- Go to the mod settings and select your browser
- Put a video and wait for it to fail, then look at the logs
- It should tell you an error because it can't find your cookies in a path, for Firefox it looks like
AppData/Local/Packages/Mozilla.Firefox_n80bbvh6b1yt2/LocalCache/Roaming/Mozilla/Firefox/Profiles/
- It should tell you an error because it can't find your cookies in a path, for Firefox it looks like
- Go to AppData in the drive_c of the game, on Arch this is usually located at
/home/[USER]/.local/share/Steam/steamapps/compatdata/661130/pfx/drive_c/users/steamuser/Appdata - Create all the folders that it requires until the last one, for Firefox this means the folders
Packages,Mozilla.Firefox_n80bbvh6b1yt2,LocalCache,Roaming,MozillaandFirefoxbut don't create the last one (Profiles) yet unless you don't intend to use your real browser - Because your cookies could change or expire, instead of giving it the files once, we'll use a symlink to the real firefox on your machine. This is completely up to you and you could just copy the files or get them from somewhere else
- Now you can create a link that points to the folder of your browser on Linux. For Firefox, this is the
Profilesfolder that should point to/home/[USER]/.mozilla/firefox/ - If you followed all the steps, the next video you put should successfully get the cookies from your browser
Notes
- After first use yt-dlp will remove unnecessary cookies from file automatically.
- Cookies contain private information and access to your YouTube account, do not share them to anyone.