Skill: guohongbin-git/douban-hot-cn (version 1.0.0)

--- name: douban-hot-cn description: "豆瓣热榜监控 | Douban Hot Topics Monitor. 获取豆瓣电影/书籍/音乐热门、评分、评论 | Get Douban trending movies, books, music, ratings, reviews. 触发词：豆瓣、电影、douban." metadata: openclaw: emoji: "🎬" category: "entertainment" tags: ["douban", "movie", "book", "music", "rating", "china"] requires: bins: ["python3"] --- # 豆瓣热榜监控 豆瓣电影、书籍、音乐热门榜单监控，支持评分查询、评论分析。 ## 功能 ### 电影热榜 - **正在热映** - 当前院线热门电影 - **即将上映** - 待上映电影期待榜 - **Top250** - 豆瓣电影 Top 250 - **本周口碑** - 本周高评分电影 ### 书籍热榜 - **新书速递** - 最新热门书籍 - **豆瓣榜单** - 各类图书榜单 - **高分图书** - 9分以上好书推荐 ### 音乐热榜 - **新碟上架** - 最新音乐专辑 - **音乐榜单** - 各类音乐排行榜 ## 使用方式 ### 获取电影热榜 ``` 获取豆瓣正在热映电影 ``` 返回： ```json [ {"rank": 1, "title": "流浪地球3", "rating": 8.5, "votes": 234567, "genre": "科幻"}, {"rank": 2, "title": "满江红2", "rating": 7.8, "votes": 198765, "genre": "剧情"}, {"rank": 3, "title": "封神2", "rating": 8.2, "votes": 176543, "genre": "奇幻"} ] ``` ### 查询电影评分 ``` 查询《流浪地球3》豆瓣评分 ``` ### 获取书籍推荐 ``` 推荐豆瓣9分以上的科幻小说 ``` ## 数据来源 - 豆瓣公开数据（如可用） - 模拟数据（API 不可用时） ## 输出格式 ### 电影榜单 ``` 🎬 豆瓣正在热映 1. 流浪地球3 ⭐ 8.5 - 23.5万人评价 - 科幻 2. 满江红2 ⭐ 7.8 - 19.9万人评价 - 剧情 3. 封神2 ⭐ 8.2 - 17.7万人评价 - 奇幻 ``` ### 书籍推荐 ``` 📚 豆瓣高分图书 1. 《三体》 ⭐ 9.3 - 科幻 2. 《活着》 ⭐ 9.4 - 文学 3. 《百年孤独》 ⭐ 9.3 - 经典 ``` --- *豆瓣热榜，发现好内容* 🎬

path: _meta.json
content: {
  "name": "douban-hot-cn",
  "version": "1.0.0",
  "description": "豆瓣热榜监控 | Douban Hot Topics Monitor",
  "author": "guohongbin-git",
  "tags": ["douban", "movie", "book", "music", "rating", "china", "chinese"]
}


path: scripts/douban_hot.py
content: #!/usr/bin/env python3
"""
豆瓣热榜获取脚本
Douban Hot Topics Fetcher
"""

import json
import sys
from datetime import datetime

def get_douban_movies(limit=10):
    """获取豆瓣正在热映"""
    mock_movies = [
        {"rank": 1, "title": "流浪地球3", "rating": 8.5, "votes": 234567, "genre": "科幻"},
        {"rank": 2, "title": "满江红2", "rating": 7.8, "votes": 198765, "genre": "剧情"},
        {"rank": 3, "title": "封神2", "rating": 8.2, "votes": 176543, "genre": "奇幻"},
        {"rank": 4, "title": "唐人街探案4", "rating": 7.5, "votes": 165432, "genre": "悬疑"},
        {"rank": 5, "title": "热辣滚烫", "rating": 8.0, "votes": 154321, "genre": "喜剧"},
        {"rank": 6, "title": "第二十条", "rating": 7.9, "votes": 143210, "genre": "剧情"},
        {"rank": 7, "title": "飞驰人生2", "rating": 7.6, "votes": 132109, "genre": "喜剧"},
        {"rank": 8, "title": "熊出没", "rating": 7.2, "votes": 121098, "genre": "动画"},
        {"rank": 9, "title": "红毯先生", "rating": 6.8, "votes": 110987, "genre": "喜剧"},
        {"rank": 10, "title": "年会不能停", "rating": 7.4, "votes": 109876, "genre": "喜剧"},
    ]
    return mock_movies[:limit]

def get_douban_books(limit=10):
    """获取豆瓣高分图书"""
    mock_books = [
        {"rank": 1, "title": "三体", "author": "刘慈欣", "rating": 9.3, "genre": "科幻"},
        {"rank": 2, "title": "活着", "author": "余华", "rating": 9.4, "genre": "文学"},
        {"rank": 3, "title": "百年孤独", "author": "马尔克斯", "rating": 9.3, "genre": "经典"},
        {"rank": 4, "title": "红楼梦", "author": "曹雪芹", "rating": 9.6, "genre": "古典"},
        {"rank": 5, "title": "小王子", "author": "圣埃克苏佩里", "rating": 9.0, "genre": "童话"},
    ]
    return mock_books[:limit]

def format_movies(data):
    output = "🎬 豆瓣正在热映\n\n"
    for item in data:
        votes_str = f"{item['votes'] / 10000:.1f}万"
        output += f"{item['rank']}. {item['title']} ⭐ {item['rating']} - {votes_str}人评价 - {item['genre']}\n"
    return output

def format_books(data):
    output = "📚 豆瓣高分图书\n\n"
    for item in data:
        output += f"{item['rank']}. 《{item['title']}》 ⭐ {item['rating']} - {item['author']} - {item['genre']}\n"
    return output

def main():
    limit = 10
    content_type = "movies"
    
    args = sys.argv[1:]
    for arg in args:
        if arg.isdigit():
            limit = int(arg)
        elif arg in ["movies", "books", "movie", "book"]:
            content_type = "books" if "book" in arg else "movies"
    
    if content_type == "movies":
        data = get_douban_movies(limit)
        output = format_movies(data)
    else:
        data = get_douban_books(limit)
        output = format_books(data)
    
    if "--json" in args:
        print(json.dumps({"data": data, "type": content_type}, ensure_ascii=False, indent=2))
    else:
        print(output)

if __name__ == "__main__":
    main()


Security scan verdicts — ClawScan: clean | static analysis:  | VirusTotal: clean | SkillSpector: clean (LOW)