Install
openclaw skills install @wlc-dev/huawei-cloud-daily-hot-topicsQuery and display today's hot topics in one shot: fetch a ranked hot list (rank / title / hot value / source) from public, authentication-free hot-list REST APIs over HTTPS (read-only), normalise the results and print them as a readable Markdown table by default (plain text and JSON are also available). Providers are abstracted and tried in order, degrading to a bundled sample dataset — clearly marked as sample data — when the network or every provider is unavailable, so a single run always yields a readable result without crashing. Implemented with the Python 3 standard library only; it does not call the Huawei Cloud CLI, any Huawei Cloud SDK, or any Huawei Cloud REST API, requires no AK/SK credentials, and touches no cloud resource. Triggers include: "查询今日热点", "今日热点榜单", "热门话题", "今日热搜", "热点榜", "daily hot topics", "today hot list", "trending topics".
openclaw skills install @wlc-dev/huawei-cloud-daily-hot-topicsThis skill answers "what is hot today?" in a single call. It fetches a ranked hot-topic list from public, keyless hot-list REST endpoints (read-only over HTTPS), normalises every provider into one shape, and renders a readable list.
--top entries.--source pins a preferred
provider while keeping the remaining providers as fallbacks.urllib), zero
third-party dependencies, no credentials.python3 (or python) on PATH.scripts/sample_data.json and still
succeeds.scripts/sample_data.json ships with the skill and is used only as the final
fallback.resolve_chain(source) returns the ordered
list of providers to try: the default chain for auto, or the requested
source first followed by the remaining default providers.fetch_source(name, timeout, retries) performs a
read-only HTTPS GET with a bounded timeout and a small retry budget, parses
the JSON, validates the envelope, and normalises the records.normalize(records, label) maps heterogeneous fields into
{rank, title, hot, source, url}, skipping records without a usable title.fetch(...) walks the chain; the first provider that returns a
non-empty list wins. If all fail (or --offline is set), it loads the bundled
sample dataset and marks the result as sample data, collecting a warning trail.render_markdown() / render_text() / render_json() turn the
result into readable output, constrained to --top entries.--output
is given.# Default: today's hot list as a Markdown table (top 10)
python3 scripts/fetch_hot_topics.py
# Plain text, only the top 5
python3 scripts/fetch_hot_topics.py --format text --top 5
# Machine-readable JSON (parseable), top 3
python3 scripts/fetch_hot_topics.py --format json --top 3
# Pin a preferred provider (falls back to the other providers, then sample data)
python3 scripts/fetch_hot_topics.py --source zhihu --top 20
# Skip the network entirely and use the bundled sample dataset
python3 scripts/fetch_hot_topics.py --offline
# List the available providers
python3 scripts/fetch_hot_topics.py --list-sources
# Write the result to a file, with a longer timeout
python3 scripts/fetch_hot_topics.py --format markdown --timeout 30 --output hot.md
# Run the bundled unit tests (offline; HTTP is mocked)
python3 -m unittest discover -s tests -v
The command-line entry point is scripts/fetch_hot_topics.py. The bundled
scripts/sample_data.json is what the offline fallback reads by default.
| Parameter | Required | Description | Default |
|---|---|---|---|
--top | No | Number of entries to show | 10 |
--source | No | Preferred provider: auto, weibo, zhihu, douyin, vvhan | auto |
--format | No | Output format: markdown, text, or json | markdown |
--output | No | Write the result to a file instead of stdout | stdout |
--timeout | No | Per-request timeout in seconds | 20 |
--retries | No | Retry attempts per provider | 2 |
--offline | No | Skip the network and use the bundled sample dataset | off |
--list-sources | No | Print the available providers and exit | off |
| Document | Description |
|---|---|
| references/usage-guide.md | Command recipes, provider chain, offline behaviour, extending providers |
| references/verification-method.md | How the skill is verified (offline unit tests + live read-only spot checks) |
| references/acceptance-criteria.md | Acceptance criteria and out-of-scope items |
| references/dataflow-diagram.md | Mermaid data flow diagram |
| references/iam-policies.md | Permission notes (none required) |
--output file. It never touches a
cloud resource and never persists fetched data.0 on success (including fallback to sample data); a non-zero
code is returned only for invalid arguments or when --output cannot be written.PROVIDERS registry in the script.