Skill: noblegasesgoo/anime-meme-collector (version 0.1.0)

--- name: anime-meme-collector description: Daily collection and management of anime/ACG memes and trending phrases from Chinese internet. Automatically fetches from Bilibili and other platforms to build a meme database for enhancing AI's understanding of otaku culture. Use when user wants to stay updated with anime community trends or improve AI's anime/meme knowledge. --- # Anime Meme Collector Automated daily collection of anime/ACG memes from Chinese internet platforms. ## Overview Maintains an up-to-date database of: - Bilibili trending video memes - Bilibili hot search keywords - Galgame terminology (Yuzusoft, Key, Type-Moon, etc.) - Streamer/gaming culture (电棍, 山泥若, 炫狗, etc.) - 346+ curated memes ## Quick Start ### Manual Collection ```bash python scripts/collect_memes.py ``` ### Automated Daily Updates Set up cron job for midnight (Asia/Shanghai): ```bash 0 0 * * * cd /path/to/skill && python scripts/collect_memes.py ``` Or use OpenClaw cron: ```json { "action": "add", "job": { "name": "daily-anime-meme-collect", "schedule": { "kind": "cron", "expr": "0 0 * * *", "tz": "Asia/Shanghai" }, "payload": { "kind": "systemEvent", "command": "python scripts/collect_memes.py" } } } ``` ## Using the Database When responding with anime/meme context: 1. Check `references/anime_memes_db.json` for recent trends 2. Reference `references/anime_memes_manual.md` for classics 3. Incorporate memes naturally into responses ## Data Sources - **Bilibili API**: Trending videos and hot search - **Manual curation**: Classic and timeless memes - **Galgame terms**: Yuzusoft, Key, Type-Moon, etc. - **Streamer culture**: 电棍, 山泥若, 炫狗, etc. ## Reference Files - [anime_memes_db.json](references/anime_memes_db.json) - Auto-generated database (300+ entries) - [anime_memes_manual.md](references/anime_memes_manual.md) - Curated classic memes ## Notes - Script respects rate limits with timeouts - Failed requests are logged but don't stop collection - Database limited to 300 entries to prevent bloat - Each entry includes source tracking

path: SKILL.zh.md
content: ---
name: anime-meme-collector
description: 每日自动收集和管理中文互联网的动漫/ACG梗和流行语。自动从Bilibili等平台获取数据，构建梗数据库以增强AI对宅文化的理解。当用户希望了解动漫社区趋势或提升AI的动漫/梗知识时使用。
---

# 动漫梗收集器 (Anime Meme Collector)

中文互联网平台动漫/ACG梗的自动每日收集。

## 概述

维护最新数据库，包含：
- Bilibili热门视频梗
- Bilibili热搜关键词
- Galgame术语（柚子社、Key、型月等）
- 主播/游戏文化（电棍、山泥若、炫狗等）
- 346+ 精选梗

## 快速开始

### 手动收集

```bash
python scripts/collect_memes.py
```

### 自动每日更新

设置定时任务在午夜运行（北京时间）：

```bash
0 0 * * * cd /path/to/skill && python scripts/collect_memes.py
```

或使用 OpenClaw cron：
```json
{
  "action": "add",
  "job": {
    "name": "daily-anime-meme-collect",
    "schedule": { "kind": "cron", "expr": "0 0 * * *", "tz": "Asia/Shanghai" },
    "payload": {
      "kind": "systemEvent",
      "command": "python scripts/collect_memes.py"
    }
  }
}
```

## 使用数据库

在动漫/梗语境下回复时：
1. 查看 `references/anime_memes_db.json` 了解最新趋势
2. 参考 `references/anime_memes_manual.md` 获取经典梗
3. 自然地将梗融入回复

## 数据来源

- **Bilibili API**: 热门视频和热搜
- **人工整理**: 经典和 timeless 梗
- **Galgame术语**: 柚子社、Key、型月等
- **主播文化**: 电棍、山泥若、炫狗等

## 参考文件

- [anime_memes_db.json](references/anime_memes_db.json) - 自动生成数据库（300+条目）
- [anime_memes_manual.md](references/anime_memes_manual.md) - 精选经典梗

## 注意事项

- 脚本遵守速率限制并包含超时
- 失败的请求会被记录但不会停止收集
- 数据库限制为300条目以防止膨胀
- 每个条目包含来源追踪


path: references/anime_memes_db.json
content: {
  "memes": [
    "窗社",
    "恋爱成双",
    "Ciallo",
    "RIDDLE JOKER",
    "三司绫濑",
    "Summer Pockets",
    "春日野穹",
    "恋×シンアイ彼女",
    "海猫鸣泣之时",
    "明日方舟：终末地",
    "寄宿之恋",
    "3days",
    "纯白交响曲",
    "克里斯蒂娜",
    "四季夏目",
    "Trinoline",
    "兰斯系列",
    "八卦恋爱",
    "二条院羽月",
    "汐山凉音",
    "缘之空",
    "TES WBG",
    "谷风天音",
    "红月摇曳的恋之星火",
    "少女理论",
    "夏娃系列",
    "追番时间到",
    "ATRI",
    "夏娃年代记",
    "小木曾雪菜",
    "永不枯萎的世界与终结之花",
    "在原七海",
    "天结",
    "一名中国公民在伊朗遇难",
    "水葬银货的伊斯特里亚",
    "天使☆騒々 RE-BOOT!",
    "式部茉优",
    "Kanon",
    "水晶社",
    "夏空彼方",
    "恋爱，我借走了",
    "魔宴",
    "Madosoft",
    "Key社",
    "蕾娜·列支敦瑙尔",
    "星光咖啡馆",
    "素晴日",
    "千恋万花",
    "恋花绽放樱飞时",
    "美好的每一天",
    "多娜多娜",
    "马庭芦花",
    "近月少女的礼仪2",
    "茨木梨乃",
    "宿星的女朋友",
    "椎叶紬",
    "命运石之门",
    "速通各专业读研性价比",
    "寒蝉鸣泣之时",
    "Marmalade",
    "ASa Project",
    "富婆妹",
    "Fate",
    "BALDR FORCE",
    "向日葵教会和漫长的暑假",
    "今日份的二次元能量",
    "终之空",
    "野良与皇女与流浪猫之心",
    "牵绊闪耀的恋之伊吕波",
    "樱之刻",
    "因幡巡",
    "月姬",
    "常陆茉子",
    "星河辉耶",
    "Rewrite",
    "密命王牌",
    "幸运草的约定",
    "Clannad",
    "因幡爱瑠",
    "丛雨",
    "近月少女的礼仪",
    "封缄",
    "大图书馆的牧羊人",
    "魔法使之夜",
    "SPPL",
    "A社",
    "纸上的魔法使",
    "DRACU-RIOT",
    "灰色的果实",
    "悠之空",
    "蕾娜",
    "奇异恩典",
    "颜艺社",
    "魔女的夜宴",
    "火打谷爱衣",
    "11eyes",
    "樱花萌放",
    "地缘危机后如何布局投资",
    "柚子社",
    "生化危机9：安魂曲",
    "北原春希",
    "樱小路露娜",
    "亚托莉",
    "绫地宁宁",
    "助手",
    "今日抽卡运势",
    "借恋",
    "户隐憧子",
    "BALDR",
    "下一个是谁6",
    "调色板",
    "灵感满溢的甜蜜创想",
    "城门翼",
    "Steins;Gate",
    "五彩斑斓的世界",
    "新番更新日",
    "白雪乃爱",
    "金辉恋曲四重奏",
    "兰斯",
    "任性High Spec",
    "Hooksoft",
    "PRIMAL×HEARTS",
    "墨染希",
    "网警带你识破网络谣言真面目",
    "绝区零",
    "Air",
    "管乐恋曲",
    "型月",
    "鉴纯夏",
    "BALDR SKY",
    "枕社",
    "从一无所有到再造山河",
    "电棍",
    "otto",
    "侯国玉",
    "稳健棍",
    "吉吉国王",
    "张顺飞",
    "劳张",
    "顺飞",
    "唐氏",
    "山泥若",
    "腾杨天下",
    "若子",
    "炫神",
    "炫狗",
    "Last炫神",
    "选购",
    "大司马",
    "芜湖大司马",
    "马老师",
    "易拉罐",
    "引流狗",
    "ylg",
    "说的道理",
    "欧内的手",
    "哈姆",
    "哇袄",
    "冲刺",
    "独轮车",
    "房管呢",
    "封一下",
    "成分查询",
    "小仲",
    "腾杨赛评",
    "永远的神",
    "yyds",
    "乌兹",
    "起飞",
    "肉蛋葱鸡",
    "千层饼",
    "正方形打野",
    "皮克斯",
    "kiyomi",
    "白字",
    "彩字",
    "钻粉",
    "SC",
    "醒目留言",
    "舰长",
    "提督",
    "总督",
    "礼物呢",
    "老板大气",
    "666",
    "???",
    "哈哈哈",
    "泪目",
    "破防了",
    "急了急了",
    "不会吧不会吧",
    "就这",
    "差不多得了",
    "典中典",
    "蚌埠住了",
    "笑死",
    "逆天",
    "离谱",
    "好家伙",
    "绝了",
    "好活",
    "烂活",
    "整活",
    "开团",
    "节奏",
    "吃瓜",
    "站队",
    "洗地",
    "黑子",
    "孝子",
    "反串",
    "钓鱼",
    "上钩了",
    "红温",
    "沉默",
    "光速下播",
    "今天不播",
    "请假",
    "身体不舒服",
    "家里有事",
    "网炸了",
    "电脑坏了",
    "被gank了",
    "LPL",
    "LCK",
    "LOL",
    "英雄联盟",
    "乌兹",
    "Uzi",
    "Faker",
    "TheShy",
    "Rookie",
    "杰克爱",
    "阿水",
    "Knight",
    "左手",
    "Doinb",
    "金咕咕",
    "猴子",
    "Viper",
    "Scout",
    "小学弟",
    "Ming",
    "小明",
    "Meiko",
    "田野",
    "厂长",
    "Clearlove",
    "7酱",
    "污渍",
    "永远滴神",
    "世界第一ADC",
    "虚空冠军",
    "gsl",
    "狗斯林",
    "皇杂",
    "猪杂",
    "鸡杂",
    "水鬼",
    "科杂",
    "T1粉丝",
    "韩杂",
    "精韩",
    "白银",
    "癌症晚期",
    "上不去下不来",
    "卡在这里了",
    "上不去",
    "队友呢",
    "队友呢队友呢",
    "这波不亏",
    "小赚",
    "这波血赚",
    "这波血亏",
    "可以打",
    "不能打",
    "别追了",
    "一波",
    "一波了",
    "GG",
    "投降",
    "点了",
    "15",
    "/ff",
    "打野差距",
    "中单差距",
    "AD差距",
    "辅助差距",
    "上单差距",
    "意识",
    "操作",
    "细节",
    "拉扯",
    "这波我在第五层",
    "他在第一层",
    "博弈",
    "心理战",
    "预判",
    "反预判",
    "我预判了你的预判"
  ],
  "last_update": "2026-03-02T17:31:56.294593",
  "stats": {
    "total": 346,
    "added_today": 169,
    "sources": {
      "bilibili_trending": 5,
      "bilibili_hot": 10,
      "zhihu": 0,
      "galgame": 175,
      "streamer": 174,
      "daily": 5
    }
  }
}

path: references/anime_memes_manual.md
content: # 二次元烂梗数据库

## 经典二次元梗

### 动漫经典
- "错的不是我，是世界" - 《Code Geass》
- "我已经看到结局了" - 《只有神知道的世界》
- "都是时臣的错" - 《Fate/Zero》
- "不要停下来啊" - 《铁血的奥尔芬斯》
- "女人唱歌男人死" - 同上
- "希望之花" - 同上
- "团长，你在干什么啊团长" - 同上

### 网络流行
- "我全都要" - 周星驰电影梗
- "真香" - 王境泽
- "AWSL" - 啊我死了
- "yyds" - 永远的神
- "绝绝子" - 极致赞美
- "蚌埠住了" - 绷不住了
- "破防了" - 心理防线被突破
- "emo了" - 情绪低落
- "社死" - 社会性死亡
- "躺平" - 放弃奋斗
- "内卷" - 过度竞争
- "摆烂" - 破罐子破摔

### 二次元特色
- "肥宅快乐水" - 可乐
- "纸片人老婆" - 二次元角色
- "氪金" - 游戏充值
- "肝" - 长时间游戏
- "欧皇/非酋" - 运气好坏
- "毒奶" - 反向预言
- "flag" - 死亡flag
- "便当" - 角色死亡
- "黑化" - 性格转变
- "中二病" - 自我意识过剩

### 游戏相关
- "原神，启动！" - 《原神》
- "原来你也玩原神" - 同上
- "纠缠之缘" - 抽卡道具
- "保底人" - 抽卡保底
- "歪了" - 抽卡歪了
- "圣遗物" - 装备系统
- "树脂" - 体力系统
- "每日委托" - 日常任务

### 番剧相关
- "追番" - 看动画
- "补番" - 补看旧动画
- "新番" - 当季动画
- "霸权" - 当季最火
- "药丸" - 要完
- "炸裂" - 非常精彩
- "经费燃烧" - 制作精良
- "PPT" - 制作粗糙
- "崩坏" - 作画崩坏

### 弹幕文化
- "前方高能"
- "非战斗人员请撤离"
- "护眼小分队"
- "空降成功"
- "空降坐标"
- "感谢指挥部"
- "考古"
- "合影留念"
- "火钳刘明" - 火前留名
- "第一"
- "承包"
- "表白"

### 萌属性
- "傲娇" - 外冷内热
- "病娇" - 病态爱恋
- "天然呆" - 自然呆萌
- "腹黑" - 外表善良内心黑暗
- "三无" - 无口无心无表情
- "御姐" - 成熟女性
- "萝莉" - 年幼女孩
- "正太" - 年幼男孩
- "御宅" - 宅
- "腐女" - BL爱好者

### 经典台词
- "真相只有一个" - 《名侦探柯南》
- "我要成为海贼王" - 《海贼王》
- "木叶飞舞之处，火亦生生不息" - 《火影忍者》
- "卍解" - 《死神》
- "天马流星拳" - 《圣斗士星矢》
- "代表月亮消灭你" - 《美少女战士》
- "就决定是你了" - 《宝可梦》
- "十万伏特" - 同上

### 主播/电竞烂梗
- "电棍" - otto、稳健棍、吉吉国王
- "张顺飞" - 劳张、顺飞、唐氏
- "山泥若" - 腾杨天下、若子、永远的神出处
- "炫狗" - 炫神、Last炫神、选购
- "易拉罐" - 引流狗、ylg
- "otto" - 电棍本名侯国玉
- "说的道理" - 电棍经典鬼畜
- "欧内的手" - 电棍鬼畜空耳
- "哈姆" - 电棍鬼畜
- "哇袄" - 电棍鬼畜
- "冲刺" - 电棍直播间文化
- "独轮车" - 弹幕刷屏
- "房管呢房管呢" - 直播间梗
- "封一下" - 要求封禁
- "成分查询" - 查弹幕成分
- "主播是不是小仲" - 质疑主播
- "唐" - 唐氏综合征，形容操作离谱
- "劳" - 老+唐，形容又老又唐
- "顺" - 顺从、投降
- "选购" - 炫神粉丝自称
- "若子" - 山泥若粉丝称呼
- "腾杨赛评" - 山泥若经典视频
- "永远的神" - Uzi，出自山泥若
- "yyds" - 永远的神缩写
- "芜湖" - 大司马，但也被主播圈使用
- "起飞" - 同上
- "肉蛋葱鸡" - 大司马
- "千层饼" - 大司马
- "正方形打野" - 大司马
- "皮克斯" - 电棍的猫
- "kiyomi" - 电棍女友
- "白字/彩字" - 弹幕等级
- "钻粉" - 付费粉丝
- "SC" - Super Chat，醒目留言
- "舰长" - B站付费会员
- "提督" - B站高等级付费会员
- "总督" - B站最高等级付费会员
- "礼物呢" - 主播要礼物
- "感谢XX的XX" - 感谢打赏
- "老板大气" - 感谢大额打赏
- "666" - 称赞操作
- "???" - 表示疑惑
- "哈哈哈" - 弹幕刷屏
- "泪目" - 感动
- "破防了" - 心理防线被突破
- "急了急了" - 嘲讽对方着急
- "不会吧不会吧" - 阴阳怪气
- "就这" - 表示不屑
- "差不多得了" - 表示厌烦
- "典中典" - 经典中的经典
- "蚌埠住了" - 绷不住了
- "笑死" - 觉得好笑
- "逆天" - 操作离谱
- "离谱" - 不正常
- "好家伙" - 表示惊讶
- "绝了" - 极致评价
- "好活" - 称赞整活
- "烂活" - 批评整活
- "整活" - 搞怪
- "开团" - 发起节奏
- "节奏" - 争议话题
- "吃瓜" - 围观
- "站队" - 选择立场
- "洗地" - 为某人辩护
- "黑子" - 黑粉
- "孝子" - 无脑维护者
- "反串" - 假装对立面
- "钓鱼" - 故意引战
- "上钩了" - 被钓鱼成功
- "急了" - 情绪失控
- "破防" - 心理崩溃
- "红温" - 生气到脸红
- "沉默" - 无言以对
- "下播" - 结束直播
- "光速下播" - 快速结束
- "今天不播" - 鸽了
- "请假" - 不直播的理由
- "身体不舒服" - 常见请假理由
- "家里有事" - 同上
- "网炸了" - 网络问题
- "电脑坏了" - 设备问题
- "被gank了" - 被打扰

### Galgame 经典梗
- "Ciallo～(∠・ω< )⌒☆" - 《魔女的夜宴》柚子社经典问候
- "锉刀" - 《千恋万花》丛雨梗
- "0721" - 《魔女的夜宴》绫地宁宁梗
- "德国骨科" - 兄妹恋梗
- "白学" - 《白色相簿2》相关
- "冬马小三/雪菜碧池" - 《白色相簿2》党争
- "为什么会变成这样呢" - 《白色相簿2》经典台词
- "明明是我先来的" - 同上
- "届不到的爱恋" - 同上
- "胃药" - 剧情虐心需要吃药
- "诚哥死的早" - 《School Days》
- "Nice Boat" - 同上
- "人渣诚" - 同上
- "柴刀女" - 《寒蝉鸣泣之时》
- "蝉在叫，人坏掉" - 同上
- "轮回" - 时间循环剧情
- "TE/HE/BE" - True End/Happy End/Bad End
- "全CG回收" - 完美通关
- "推Gal" - 玩Galgame
- "柚子社" - Yuzusoft，知名Gal厂商
- "Key社" - 知名催泪Gal厂商
- "型月" - TYPE-MOON
- "枕社" - Makura
- "调色板" - Palette
- "颜艺社" - ASa Project
- "水晶社" - Crystalia
- "废萌" - 轻松日常向Gal
- "催泪向" - Key社风格
- "悬疑向" - 推理/悬疑剧情
- "电波向" - 独特风格
- "拔作" - R18向
- "全年龄" - 无R18内容
- "FD" - Fan Disc，后日谈
- "FD2" - 续作FD

## 使用说明

这个文件会被 `collect_memes.py` 自动更新，每天凌晨收集最新的二次元相关流行语和热梗。

### 数据来源
- B站热门视频标题
- 知乎热榜二次元相关内容
- 手动维护的经典梗

### 更新频率
- 自动更新：每天凌晨
- 手动更新：运行 `python scripts/collect_memes.py`


path: scripts/collect_memes.py
content: #!/usr/bin/env python3
"""
二次元烂梗收集器
每天自动收集网络上的二次元相关梗、流行语和热点
"""

import json
import re
import urllib.request
import urllib.parse
import ssl
from datetime import datetime
from pathlib import Path

def create_ssl_context():
    """创建SSL上下文，忽略证书验证（用于某些环境）"""
    context = ssl.create_default_context()
    context.check_hostname = False
    context.verify_mode = ssl.CERT_NONE
    return context

def fetch_bilibili_trending():
    """获取B站热门视频标题和标签"""
    try:
        url = "https://api.bilibili.com/x/web-interface/ranking/v2?rid=0&type=all"
        headers = {
            'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36',
            'Referer': 'https://www.bilibili.com'
        }
        req = urllib.request.Request(url, headers=headers)
        context = create_ssl_context()
        
        with urllib.request.urlopen(req, timeout=15, context=context) as response:
            data = json.loads(response.read().decode('utf-8'))
            memes = []
            if data.get('data', {}).get('list'):
                for item in data['data']['list'][:30]:
                    title = item.get('title', '')
                    # 提取引号内的内容
                    quotes = re.findall(r'[""""""]([^""""""]+)[""""""]', title)
                    memes.extend(quotes)
                    # 提取方括号内容
                    brackets = re.findall(r'\[([^\]]+)\]', title)
                    memes.extend(brackets)
                    # 提取书名号内容
                    books = re.findall(r'《([^》]+)》', title)
                    memes.extend(books)
                    # 提取特定模式（如"XXのXX"）
                    japanese_pattern = re.findall(r'[\u3040-\u309F\u30A0-\u30FFの]+', title)
                    memes.extend([p for p in japanese_pattern if len(p) > 2])
                    
            return list(set([m.strip() for m in memes if len(m.strip()) > 1]))[:20]
    except Exception as e:
        print(f"B站获取失败: {e}")
        return []

def fetch_bilibili_hot_search():
    """获取B站热搜"""
    try:
        url = "https://s.search.bilibili.com/main/hotword"
        headers = {
            'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36'
        }
        req = urllib.request.Request(url, headers=headers)
        context = create_ssl_context()
        
        with urllib.request.urlopen(req, timeout=15, context=context) as response:
            data = json.loads(response.read().decode('utf-8'))
            memes = []
            if data.get('list'):
                for item in data['list'][:20]:
                    keyword = item.get('keyword', '')
                    if keyword:
                        memes.append(keyword)
            return memes
    except Exception as e:
        print(f"B站热搜获取失败: {e}")
        return []

def fetch_galgame_keywords():
    """获取Galgame相关关键词"""
    gal_keywords = [
        "Ciallo", "柚子社", "千恋万花", "魔女的夜宴", "RIDDLE JOKER",
        "星光咖啡馆", "PARQUET", "天使嚣嚣", "绫地宁宁", "丛雨",
        "因幡爱瑠", "常陆茉子", "朝武芳乃", "白雪乃爱", "谷风天音",
        "Key社", "Clannad", "Air", "Kanon", "Rewrite", "Summer Pockets",
        "白色相簿2", "冬马和纱", "小木曾雪菜", "北原春希",
        "型月", "Fate", "月姬", "魔法使之夜", "空之境界",
        "枕社", "樱之诗", "樱之刻", "素晴日", "美好的每一天",
        "调色板", "9-nine", "纯白交响曲", "恋花绽放樱飞时",
        "颜艺社", "借恋", "恋爱成双", "富婆妹",
        "水晶社", "红月摇曳的恋之星火", "牵绊闪耀的恋之伊吕波",
        "近月少女的礼仪", "樱小路露娜", "Navel",
        "School Days", "寒蝉鸣泣之时", "海猫鸣泣之时",
        "命运石之门", "Steins;Gate", "助手", "克里斯蒂娜",
        "ATRI", "亚托莉", "GINKA", "SPPL",
        "Muv-Luv", "Alternative", "鉴纯夏",
        "兰斯", "夏娃年代记", "多娜多娜",
        "E社", "天结", "封缄", "神采",
        "A社", "兰斯系列", "夏娃系列",
        "BALDR", "BALDR SKY", "BALDR FORCE",
        "Euphoria", "3days", "11eyes",
        "素晴らしき日々", "终之空", "樱之诗", "樱之刻",
        "冥契的牧神节", "纸上的魔法使", "水葬银货的伊斯特里亚",
        "想要传达给你的爱恋", "恋×シンアイ彼女",
        "初雪樱", "樱花萌放", "五彩斑斓的世界",
        "向日葵教会和漫长的暑假", "永不落幕的前奏诗",
        "奇异恩典", "金辉恋曲四重奏", "金色Loveriche",
        "RIDDLE JOKER", "密命王牌",
        "DRACU-RIOT", "天色幻想岛", "魔卡魅恋",
        "Noble Works", "管乐恋曲", "夏空彼方",
        "缘之空", "悠之空", "春日野穹",
        "灰色的果实", "灰色的迷宫", "灰色的乐园",
        "少女理论", "近月少女的礼仪2",
        "大图书馆的牧羊人", "幸运草的约定",
        "星织梦未来", "永不枯萎的世界与终结之花",
        "Trinoline", "宿星的女朋友",
        "野良与皇女与流浪猫之心", "Hulotte",
        "making lovers", "SMEE", "Hooksoft",
        "PRIMAL×HEARTS", "Marmalade", "甜蜜女友",
        "任性High Spec", "Madosoft", "窗社",
        "寄宿之恋", "ASa Project", "恋爱，我借走了",
        "八卦恋爱", "恋爱成双", "她的圣域",
        "富婆妹", "灵感满溢的甜蜜创想",
        "天使嚣嚣", "天使纷扰", "天使☆騒々 RE-BOOT!",
        "魔女的夜宴", "魔宴", "宁宁", "绫地宁宁",
        "因幡巡", "椎叶紬", "户隐憧子", "仮屋和奏",
        "千恋万花", "丛雨", "朝武芳乃", "常陆茉子", "马庭芦花",
        "蕾娜", "蕾娜·列支敦瑙尔",
        "RIDDLE JOKER", "三司绫濑", "在原七海", "式部茉优", "二条院羽月",
        "星光咖啡馆", "明月栞那", "四季夏目", "墨染希", "火打谷爱衣", "汐山凉音",
        "PARQUET", "城门翼", "茨木梨乃",
        "天使嚣嚣", "白雪乃爱", "谷风天音", "小云雀来海", "星河辉耶", "高楯欧丽叶",
    ]
    return gal_keywords

def fetch_streamer_keywords():
    """获取主播/电竞圈关键词（易拉罐文化）"""
    streamer_keywords = [
        # 核心主播
        "电棍", "otto", "侯国玉", "稳健棍", "吉吉国王",
        "张顺飞", "劳张", "顺飞", "唐氏",
        "山泥若", "腾杨天下", "若子",
        "炫神", "炫狗", "Last炫神", "选购",
        "大司马", "芜湖大司马", "马老师",
        # 经典梗
        "易拉罐", "引流狗", "ylg",
        "说的道理", "欧内的手", "哈姆", "哇袄",
        "冲刺", "独轮车",
        "房管呢", "封一下", "成分查询", "小仲",
        "唐", "劳", "顺",
        "腾杨赛评", "永远的神", "yyds", "乌兹",
        "起飞", "肉蛋葱鸡", "千层饼", "正方形打野",
        "皮克斯", "kiyomi",
        "白字", "彩字", "钻粉", "SC", "醒目留言",
        "舰长", "提督", "总督",
        "礼物呢", "老板大气",
        # 弹幕文化
        "666", "???", "哈哈哈", "泪目", "破防了",
        "急了急了", "不会吧不会吧", "就这", "差不多得了",
        "典中典", "蚌埠住了", "笑死", "逆天", "离谱",
        "好家伙", "绝了", "好活", "烂活", "整活",
        "开团", "节奏", "吃瓜", "站队", "洗地",
        "黑子", "孝子", "反串", "钓鱼", "上钩了",
        "红温", "沉默", "光速下播", "今天不播",
        "请假", "身体不舒服", "家里有事", "网炸了", "电脑坏了", "被gank了",
        # 电竞相关
        "LPL", "LCK", "LOL", "英雄联盟",
        "乌兹", "Uzi", "Faker", "TheShy", "Rookie",
        "杰克爱", "阿水", "Knight", "左手",
        "Doinb", "金咕咕", "猴子",
        "Viper", "Scout", "小学弟",
        "Ming", "小明", "Meiko", "田野",
        "厂长", "Clearlove", "7酱",
        "污渍", "永远滴神",
        "世界第一ADC", "虚空冠军",
        "gsl", "狗斯林",
        "皇杂", "猪杂", "鸡杂", "水鬼",
        "科杂", "T1粉丝",
        "韩杂", "精韩",
        # 游戏梗
        "白银", "癌症晚期", "上不去下不来",
        "卡在这里了", "上不去",
        "队友呢", "队友呢队友呢",
        "这波不亏", "小赚",
        "这波血赚", "这波血亏",
        "可以打", "不能打", "撤", "卖",
        "别追了", "追", "一波", "一波了",
        "GG", "投降", "点了", "15", "/ff",
        "打野差距", "中单差距", "AD差距", "辅助差距", "上单差距",
        "意识", "操作", "细节", "拉扯",
        "这波我在第五层", "他在第一层",
        "博弈", "心理战",
        "预判", "反预判", "我预判了你的预判",
    ]
    return streamer_keywords

def fetch_zhihu_hot():
    """获取知乎热榜"""
    try:
        url = "https://www.zhihu.com/api/v3/feed/topstory/hot-lists/total?limit=50"
        headers = {
            'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36',
            'Referer': 'https://www.zhihu.com'
        }
        req = urllib.request.Request(url, headers=headers)
        context = create_ssl_context()
        
        with urllib.request.urlopen(req, timeout=15, context=context) as response:
            data = json.loads(response.read().decode('utf-8'))
            memes = []
            anime_keywords = ['动漫', '二次元', '动画', '漫画', '番剧', 'ACG', '鬼灭', '咒术', 
                           '原神', '崩坏', '明日方舟', '碧蓝', '米哈游', 'B站', '哔哩哔哩',
                           '宫崎骏', '新海诚', '柯南', '海贼王', '火影', '进击的巨人']
            if data.get('data'):
                for item in data['data']:
                    title = item.get('target', {}).get('title', '')
                    # 检查是否包含二次元关键词
                    if any(keyword in title for keyword in anime_keywords):
                        memes.append(title)
            return memes[:10]
    except Exception as e:
        print(f"知乎获取失败: {e}")
        return []

def generate_daily_memes():
    """生成每日梗（包括固定经典梗和随机组合）"""
    daily_memes = [
        "今日份的二次元能量",
        "追番时间到",
        "肝游戏了吗",
        "今日抽卡运势",
        "新番更新日",
    ]
    return daily_memes

def load_existing_memes(filepath):
    """加载已有的梗库"""
    if Path(filepath).exists():
        try:
            with open(filepath, 'r', encoding='utf-8') as f:
                return json.load(f)
        except:
            return {"memes": [], "last_update": "", "stats": {}}
    return {"memes": [], "last_update": "", "stats": {}}

def save_memes(filepath, memes_data):
    """保存梗库"""
    Path(filepath).parent.mkdir(parents=True, exist_ok=True)
    with open(filepath, 'w', encoding='utf-8') as f:
        json.dump(memes_data, f, ensure_ascii=False, indent=2)

def main():
    """主函数：收集并更新梗库"""
    output_file = Path(__file__).parent.parent / "references" / "anime_memes_db.json"
    
    print("🔍 开始收集二次元烂梗...")
    
    # 加载现有数据
    existing = load_existing_memes(output_file)
    existing_memes = set(existing.get("memes", []))
    
    # 收集新梗
    new_memes = []
    
    print("📺 正在获取B站热门...")
    bili_memes = fetch_bilibili_trending()
    new_memes.extend(bili_memes)
    print(f"   获取到 {len(bili_memes)} 个")
    
    print("🔥 正在获取B站热搜...")
    hot_memes = fetch_bilibili_hot_search()
    new_memes.extend(hot_memes)
    print(f"   获取到 {len(hot_memes)} 个")
    
    print("📱 正在获取知乎热榜...")
    zhihu_memes = fetch_zhihu_hot()
    new_memes.extend(zhihu_memes)
    print(f"   获取到 {len(zhihu_memes)} 个")
    
    print("🎮 正在加载Galgame关键词...")
    gal_memes = fetch_galgame_keywords()
    new_memes.extend(gal_memes)
    print(f"   加载了 {len(gal_memes)} 个")
    
    print("📺 正在加载主播圈关键词...")
    streamer_memes = fetch_streamer_keywords()
    new_memes.extend(streamer_memes)
    print(f"   加载了 {len(streamer_memes)} 个")
    
    # 添加每日固定梗
    daily_memes = generate_daily_memes()
    new_memes.extend(daily_memes)
    
    # 去重并合并
    all_memes = list(existing_memes)
    added_count = 0
    for meme in new_memes:
        meme_clean = meme.strip()
        if meme_clean and meme_clean not in existing_memes and len(meme_clean) > 1:
            all_memes.append(meme_clean)
            added_count += 1
    
    # 更新数据
    updated_data = {
        "memes": all_memes[-300:],  # 只保留最近300个
        "last_update": datetime.now().isoformat(),
        "stats": {
            "total": len(all_memes),
            "added_today": added_count,
            "sources": {
                "bilibili_trending": len(bili_memes),
                "bilibili_hot": len(hot_memes),
                "zhihu": len(zhihu_memes),
                "galgame": len(gal_memes),
                "streamer": len(streamer_memes),
                "daily": len(daily_memes)
            }
        }
    }
    
    # 保存
    save_memes(output_file, updated_data)
    
    print(f"\n✅ 收集完成！")
    print(f"   新增: {added_count} 个梗")
    print(f"   总计: {len(all_memes)} 个梗")
    print(f"📁 数据已保存到: {output_file}")
    
    # 显示部分新梗
    if added_count > 0:
        print(f"\n📝 今日新增梗示例:")
        for meme in all_memes[-added_count:][:5]:
            print(f"   - {meme}")
    
    return updated_data

if __name__ == "__main__":
    result = main()


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