GatherHub supports downloading YouTube videos, including private, unlisted, and age-restricted content. This page explains how to configure GatherHub to properly download YouTube videos using your account credentials.
To download YouTube videos that are:
You need to provide GatherHub with your YouTube authentication cookies from a browser where you're logged into YouTube.
For YouTube downloads to work properly, your cookies file must:
youtube.com domainsGatherHub validates these requirements when you upload a cookies file.
The recommended way to export cookies is using a browser extension:
youtube.comyoutube.comGatherHub will validate your cookies file and confirm if it contains valid YouTube authentication information.
After uploading, check that:
YouTube cookies typically expire after about 14 days. You may need to update your cookies periodically if you notice that downloads of restricted videos start to fail.
| Event | Action Required |
|---|---|
| Initial setup | Export and upload cookies as described above |
| Every ~14 days | Export new cookies and upload again |
| YouTube login changes | Re-export and upload cookies |
| Browser cleared cookies | Log in to YouTube again, then export and upload |
| Problem | Possible Cause | Solution |
|---|---|---|
| No YouTube cookies found | Not logged in when exporting cookies | Log in to YouTube first, then export cookies |
| Invalid cookie format | Incorrect export method | Use a browser extension that exports in Netscape format |
| Missing essential cookies | Partial export or logged out | Clear browser cookies, log in again, then export |
| Cookies too old | Cookie file was exported more than 14 days ago | Export fresh cookies and upload again |
| Still can't access restricted videos | Video requires specific account access | Make sure the YouTube account has access to the video |
When you upload cookies, GatherHub validates:
If validation fails, you'll see specific error messages to help you troubleshoot.
GatherHub implements several security measures for YouTube cookies:
If you're using the GatherHub API or command-line interface, you can specify the path to your cookies file:
# Using a specific cookies file for a download
./gatherhub --download https://www.youtube.com/watch?v=EXAMPLE --cookies /path/to/cookies.txt
# In your config.toml
[storage]
cookies_path = "/path/to/cookies.txt"