Closed alimirjahani7 closed 2 months ago
see https://github.com/yt-dlp/yt-dlp/blob/master/yt_dlp/cache.py
The root cache directory is determined by the _get_root_dir()
method:
self._ydl.params
.~/.cache
on Unix-like systems).~/.cache/yt-dlp
.The specific file for storing the OAuth2 token is determined by the _get_cache_fn()
method:
The final path would be:
<cache_root>/youtube-oauth2/token_data.json
So, to find the exact location on your system:
~/.cache/yt-dlp/
(on Unix-like systems) or the equivalent on Windows.The full path would be something like:
~/.cache/yt-dlp/youtube-oauth2/token_data.json
On Windows, it might be something like:
C:\Users\<YourUsername>\AppData\Local\yt-dlp\youtube-oauth2\token_data.json
To verify this, you could add a debug print statement in the store_token
method of the YouTubeOAuth2Handler
class:
def store_token(self, token_data):
self.cache.store('youtube-oauth2', 'token_data', token_data)
self._TOKEN_DATA = token_data
# Add this line:
print(f"Token stored at: {self.cache._get_cache_fn('youtube-oauth2', 'token_data', 'json')}")
This will print the exact file path where the token is being stored when the store_token
method is called.
where does the code save the auth data and credentials I want to login on one device and pass the data to multiple servers to download with but I couldn't find where the oauth is saving the data