Xiaoyuzhou Audio Download
Overview
Use the bundled script when the user asks to download a Xiaoyuzhou podcast episode in natural language, even if they do not explicitly say audio or .m4a. Fetch the episode page, extract the first .m4a URL from the HTML or embedded JSON, normalize escaped ampersands, and download the audio file.
Workflow
- Run
scripts/download_xiaoyuzhou_audio.pywith the episode URL. - Save into the user's current working directory unless they ask for another folder.
- Prefer a readable filename from the page title. Fall back to the episode id.
- After download, verify file size and type with
ls -lhandfile. - Report the absolute path to the downloaded
.m4afile.
Commands
Download directly:
python3 /Users/gai/.codex/skills/xiaoyuzhou-download/scripts/download_xiaoyuzhou_audio.py \
'https://www.xiaoyuzhoufm.com/episode/...'
Download to a specific directory:
python3 /Users/gai/.codex/skills/xiaoyuzhou-download/scripts/download_xiaoyuzhou_audio.py \
'https://www.xiaoyuzhoufm.com/episode/...' \
--output-dir /path/to/output
Only extract the audio URL:
python3 /Users/gai/.codex/skills/xiaoyuzhou-download/scripts/download_xiaoyuzhou_audio.py \
'https://www.xiaoyuzhoufm.com/episode/...' \
--dry-run
Notes
The audio URL usually appears in the server returned page source as a .m4a URL. It may be HTML escaped as & or JSON escaped as \u0026. The script handles both forms.
If the script cannot find a .m4a URL, fetch the page manually with curl -L and inspect whether Xiaoyuzhou changed the page structure or requires browser rendering.