数据抓取
花了小一周的空闲时间,爬取了小2千条诗人数据和2万多条古诗词数据,为自动回复使用
自动回复
首次关注公众号,推送信息
- 按照诗人朝代划分
# 朝代 DYNASTY = { "先秦": 1, "两汉": 2, "魏晋": 3, "南北朝": 4, "隋代": 5, "唐代": 6, "五代": 7, "宋代": 8, "金朝": 9, "元代": 10, "明代": 11, "清代": 12 }
示例
- 按古诗类型划分
# 诗词类型 POETRY_TYPE = { "春天": 1, "夏天": 2, "秋天": 3, "冬天": 4, "爱国": 5, "写雪": 6, "思念": 7, "爱情": 8, "思乡": 9, "离别": 10, "月亮": 11, "梅花": 12, "励志": 13, "荷花": 14, "写雨": 15, "友情": 16, "感恩": 17, "写风": 18, "西湖": 19, "读书": 20, "菊花": 21, "长江": 22, "黄河": 23, "竹子": 24, "哲理": 25, "泰山": 26, "边塞": 27, "柳树": 28, "写鸟": 29, "桃花": 30, "老师": 31, "母亲": 32, "伤感": 33, "田园": 34, "写云": 35, "庐山": 36, "山水": 37, "星星": 38, "荀子": 39, "孟子": 40, "论语": 41, "墨子": 42, "老子": 43, "史记": 44, "中庸": 45, "礼记": 46, "尚书": 47, "晋书": 48, "左传": 49, "论衡": 50, "管子": 51, "说苑": 52, "列子": 53, "国语": 54, "节日": 55, "春节": 56, "元宵节": 57, "寒食节": 58, "清明节": 59, "端午节": 60, "七夕节": 61, "中秋节": 62, "重阳节": 63, "韩非子": 64, "菜根谭": 65, "红楼梦": 66, "弟子规": 67, "战国策": 68, "后汉书": 69, "淮南子": 70, "商君书": 71, "水浒传": 72, "格言联璧": 73, "围炉夜话": 74, "增广贤文": 75, "吕氏春秋": 76, "文心雕龙": 77, "醒世恒言": 78, "警世通言": 79, "幼学琼林": 80, "小窗幽记": 81, "三国演义": 82, "贞观政要": 83, "唐诗三百首": 84, "古诗三百首": 85, "宋词三百首": 86, "小学古诗文": 87, "初中古诗文": 88, "高中古诗文": 89, "宋词精选": 90, "古诗十九首": 91, "诗经": 92, "楚辞": 93, "乐府诗集精选": 94, "写景": 95, "咏物": 96, "写花": 97, "写山": 98, "写水": 99, "儿童": 100, "写马": 101, "地名": 102, "怀古": 103, "抒情": 104, "送别": 105, "闺怨": 106, "悼亡": 107, "写人": 108, "战争": 109, "惜时": 110, "忧民": 111, "婉约": 112, "豪放": 113, "民谣": 114, }
示例
- 今日推荐
回复【推荐】,根据当前季节、天气等因素,返回相关古诗词数据
- 诗人名称
回复【诗人】,返回诗人朝代、介绍及诗歌推荐数据
- 诗词名称
回复【诗名】,返回诗词名句、解释、赏析、原文、译文和创作背景数据
- 【更多】功能
设置标记,缓存到redis中,时效 30 分钟,过期再次点击【更多】,提示文案
content = "会话只有30分钟,想了解更多,请重新发起~"
>>> 更多有意思的小功能请自行探索...
标签:微信,30,爬取,古诗文,古诗词,诗人,回复 From: https://www.cnblogs.com/changqing8023/p/16817237.html