AI Agent Hub
Back to skills
SmartEdu Platform Textbook Downloader icon

SmartEdu Platform Textbook Downloader

Education Updated 2026.08.30

Paste the following prompt into your AI chat to install this skill:

Follow https://skillhub.cn/install/skillhub.md to install @user_d2861954/smartedudownloader.

About this skill

Problem

The SmartEdu platform (basic.smartedu.cn) lets users browse textbook catalogs and detail pages, but the actual files are not served for direct public download. Listening MP3s and PDF textbooks are usually hosted on private CDNs (for example, r1-ndr-private.ykt.cbern.com.cn), and requests must include a X-Nd-Auth header. That header depends on the logged-in session's access_token and mac_key, and is generated by signing request details with HMAC-SHA256. Login also includes a Tencent slider captcha, which cannot be bypassed by a script. The textbook list API is usually accessible without authentication, but file downloads require the signed header. For teachers, researchers, or users organizing multiple textbooks, clicking through pages, waiting for redirects, copying tokens, and downloading manually is brittle and easy to interrupt.

How It Works

The skill breaks the process into a repeatable pipeline: login, token extraction, resource detection, download, and validation. It uses Playwright to open a visible browser, fills in the phone number and password, and asks the user to drag the slider and wait for login to complete. After login, the script reads the real credentials from the nested token structure in localStorage, then queries resource lists by textbook contentId to determine whether a title provides listening audio or only a PDF body. The token remains usable for multiple resources during its validity period, so one login can support batch processing.

Core capabilities include:
- Extract contentId from multiple textbook links and download multiple resources after a single login
- Probe the textbook type first, avoiding wrong MP3 requests for subjects such as Chinese, mathematics, or history that may have no listening audio
- Support audio, pdf, or auto modes; auto downloads MP3 when audio is available and falls back to PDF otherwise
- Perform basic output checks, such as MP3 ID3 or frame headers and PDF %PDF- and %%EOF markers

Boundaries

This workflow requires a visible browser window and manual captcha completion; it is not a fully headless login replacement. The captcha wait has a timeout, and a refresh or timeout requires re-login. Credentials are for the current session only and should not be saved in files, logs, or later task settings. Downloaded resources should be used for personal study or instructional organization, not redistribution.

Use Cases

  • Teachers receive several textbook detail links and want to batch-download English listening MP3s after one login.
  • Curriculum staff organize Chinese, math, or history textbooks and need PDF fallback when no audio exists.
  • Lesson-prep teachers need local MP3 and PDF files from multiple textbooks for offline playback and backup.
  • Course producers extract contentId from links, probe resource type first, then batch download to avoid invalid requests.

Best For

  • Primary and secondary school teachers who need to download textbook audio or PDFs from the SmartEdu platform.
  • Curriculum researchers who organize multiple textbook resources for offline teaching materials.
  • Course producers who batch-fetch textbook listening files and PDFs for lesson preparation.
  • Technical teachers who want browser-assisted download after manually completing the login slider.