Handles interactions with the dedao-dl CLI tool for downloading and managing content from the Dedao (得到) App. Use when the user wants to list bought courses,...
This skill guides the agent in using the dedao-dl CLI tool to interact with the Dedao (得到) app content.
MANDATORY FIRST STEP: Before using any dedao-dl commands for the first time, you MUST run the installation script and verify the CLI is available.
Run the script to download the latest binary for the current OS:
python scripts/install_dedao_dl.py
After installation, you should ALWAYS use the helper script scripts/run_dedao.py to execute commands instead of running the raw dedao-dl executable. The helper script cleans up the CLI's terminal formatting, making the output directly readable by you without needing to redirect it to text files.
Example: Use python scripts/run_dedao.py -h instead of ./dedao-dl -h.
Before downloading any content, ensure the user is logged in:
python scripts/run_dedao.py login -q (QR code login) or python scripts/run_dedao.py login -c "<cookie_string>"python scripts/run_dedao.py whopython scripts/run_dedao.py userspython scripts/run_dedao.py suDependencies for specific formats (inform the user if they are missing):
wkhtmltopdfffmpegFor any content download, the typical two-step workflow is:
ID.ID and format flag (-t).python scripts/run_dedao.py coursepython scripts/run_dedao.py free (Returns EnID strings instead of integer IDs)python scripts/run_dedao.py course -i <course_ID>python scripts/run_dedao.py article -c <course_EnID>python scripts/run_dedao.py dl <course_ID_or_EnID> <article_ID> -t <format>python scripts/run_dedao.py dl <course_ID_or_EnID> -t <format> [options]
-t): 1 (MP3), 2 (PDF), 3 (Markdown, DEFAULT FOR THE AGENT)-t 3): -m (merge into one file), -c (include hot comments)-o (adds index prefix like 00x.)
Note: When downloading as PDF, be aware of rate limits ("496 NoCertificate"). Add sleep intervals if scripting.python scripts/run_dedao.py ebookpython scripts/run_dedao.py dle <ebook_ID> -t <format>
-t): 1 (HTML, default), 2 (PDF), 3 (EPUB), 4 (Markdown Notes)python scripts/run_dedao.py ebook notes -i <ebook_ID>python scripts/run_dedao.py dle <ebook_ID> -t 4 (Downloads notes as Markdown)python scripts/run_dedao.py odobpython scripts/run_dedao.py dlo <audiobook_ID> -t <format>
-t): 1 (MP3), 2 (PDF), 3 (Markdown, DEFAULT FOR THE AGENT)python scripts/run_dedao.py catpython scripts/run_dedao.py acepython scripts/run_dedao.py topicpython scripts/run_dedao.py -h or python scripts/run_dedao.py <command> -h if unsure of the exact arguments.ID first before executing a download command. Make sure you use the list command corresponding to the content type you want to download (e.g., course ID for dl, ebook ID for dle, odob ID for dlo). Do not mix up IDs across categories.python scripts/run_dedao.py dl <course_ID_or_EnID>) unless the user explicitly asks you to. Many courses have hundreds of articles which can lead to account bans.course -i <course_ID> or article -c <course_EnID>, find the specific article ID, and use python scripts/run_dedao.py dl <course_ID_or_EnID> <article_ID>.dl or dlo, default to using -t 3 (Markdown) unless the user explicitly asks for MP3 or PDF. Markdown is safer, faster, and easier to read.-m to consolidate files unless the user explicitly asks for individual files.ZIP package — ready to use