pocket-casts
Download YouTube videos and upload them to Pocket Casts Files for offline viewing.
Installation
npx clawhub@latest install pocket-casts-ytView the full skill documentation and source below.
Documentation
Pocket Casts YouTube Uploader
Download YouTube videos and upload them to Pocket Casts Files for offline viewing.
Usage
~/skills/pocket-casts/scripts/upload.sh "YOUTUBE_URL"
Or with a custom title:
~/skills/pocket-casts/scripts/upload.sh "YOUTUBE_URL" "Custom Title"
Prerequisites
Required
- yt-dlp - YouTube downloader (via uv:
uvx yt-dlp) - ffmpeg - Video processing (
apt install ffmpeg) - curl - HTTP requests (usually pre-installed)
- jq - JSON parsing (
apt install jq)
Recommended
- deno - JavaScript runtime for yt-dlp challenges:
curl -fsSL | sh
Add to PATH: export PATH="$HOME/.deno/bin:$PATH"
Setup
mkdir -p ~/.clawdbot/credentials/pocket-casts
chmod 700 ~/.clawdbot/credentials/pocket-casts
Get your refresh token from browser dev tools while logged into pocketcasts.com, then:
cat > ~/.clawdbot/credentials/pocket-casts/config.json << 'EOF'
{
"refreshToken": "YOUR_REFRESH_TOKEN_HERE"
}
EOF
chmod 600 ~/.clawdbot/credentials/pocket-casts/config.jsonThe refresh token lasts ~1 year. Access tokens are fetched automatically.
YouTube's bot detection requires cookies from a logged-in browser session.
- Install "Get cookies.txt LOCALLY" browser extension (or similar)
- Go to youtube.com while logged in
- Export cookies via the extension
- Save to
~/.clawdbot/credentials/pocket-casts/cookies.txtchmod 600 ~/.clawdbot/credentials/pocket-casts/cookies.txt
How It Works
yt-dlp --remux-video mp4Environment Variables
CLAWDBOT_CREDENTIALS- Override credentials directory (default:~/.clawdbot/credentials)
Notes
- Files appear in the Pocket Casts "Files" tab
- Videos play natively in the app (iOS/Android/Web)
- Max file size depends on your Pocket Casts subscription (~2GB for Plus)
- Cookies may need refreshing if YouTube blocks requests
⚠️ Legal Disclaimer
This skill is provided for personal, fair-use purposes only.
- YouTube Terms of Service prohibit downloading videos except via official means. Downloading may violate YouTube's ToS depending on your jurisdiction and intended use.
- Pocket Casts Terms require that you own or have the rights to any media you upload to your Files library.
- Copyright law varies by country. Downloading and storing copyrighted content without permission may be illegal in your jurisdiction.
Recommended uses: Personal recordings, Creative Commons content, videos you created, or content where the creator has explicitly permitted downloading.