{"id":21557286,"url":"https://github.com/sweeticelolly/qq_msdoc_bot","last_synced_at":"2025-03-18T03:24:36.650Z","repository":{"id":159225887,"uuid":"240630842","full_name":"SweetIceLolly/QQ_MsDoc_Bot","owner":"SweetIceLolly","description":"从微软官方文档里搜索资料的QQ聊天机器人","archived":false,"fork":false,"pushed_at":"2020-02-15T02:17:34.000Z","size":6380,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-24T10:46:49.634Z","etag":null,"topics":["chrome-driver","chromedriver","coolq","coolq-http-api","msdn","msdn-documentation","python3","qq","qqbot","qqrobot","webdriver"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SweetIceLolly.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-02-15T02:09:07.000Z","updated_at":"2022-07-07T02:35:05.000Z","dependencies_parsed_at":null,"dependency_job_id":"ada031ae-34e5-4b34-8637-341af105bf5a","html_url":"https://github.com/SweetIceLolly/QQ_MsDoc_Bot","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SweetIceLolly%2FQQ_MsDoc_Bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SweetIceLolly%2FQQ_MsDoc_Bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SweetIceLolly%2FQQ_MsDoc_Bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SweetIceLolly%2FQQ_MsDoc_Bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SweetIceLolly","download_url":"https://codeload.github.com/SweetIceLolly/QQ_MsDoc_Bot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244148524,"owners_count":20406197,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chrome-driver","chromedriver","coolq","coolq-http-api","msdn","msdn-documentation","python3","qq","qqbot","qqrobot","webdriver"],"created_at":"2024-11-24T08:11:52.324Z","updated_at":"2025-03-18T03:24:36.626Z","avatar_url":"https://github.com/SweetIceLolly.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# QQ_MsDoc_Bot\n从微软官方文档里搜索资料的QQ聊天机器人\n\n# 功能\n1. 根据消息自动搜索相关内容，拉取第一条链接，模拟点击进入，并通过获取页面元素的方式抽取标题、描述、代码片段等信息。\n2. 若消息以“中文”开头，例如“中文 SendMessage”，该程序会使用有道翻译API把拉取道德页面标题和描述翻译成中文。\n3. 若消息里面包含中文字符，该程序会先使用有道翻译API把消息翻译成英文然后再进行搜索。\n\n# 准备\n1. 安装酷Q和酷Q的HTTP API插件\n2. 安装依赖的python库\n3. 安装ChromeDriver (WebDriver for Chrome)\n4. 把YoudaoTranslateAPI.py里面有关的key替换成您的key以使用中英文翻译功能\n\n# 效果\n![控制台界面](Image1.png)\n\u003cbr\u003e控制台界面\u003cbr\u003e\u003cbr\u003e\n\n![聊天界面](Image2.png)\n\u003cbr\u003e聊天界面\u003cbr\u003e\u003cbr\u003e\n\n# 啰嗦话\n这是我第二次尝试弄QQ机器人，以及第一次尝试用python通过webdriver解析网页信息。也挺有意义的 :)\n\n自感觉这次比第一次写的聊天机器人进步不少，代码也好看了一点。\n\n本来想弄成把目标网页截图然后发送截图的方式，但是酷Q Pro才能发图，故放弃。\n\n发现本程序有时候会发送消息失败，暂不明白原因。猜测是消息长度太长导致的（但是有时候短消息也会发送失败）。暂时没有找到好的解决方法。目前的解决方法是把消息长度限制在415字以内（这个数字是经过多次尝试得出的），但是仍然有一定几率消息发送失败。\n\n非常感谢亲爱的阳光加冰把他的有道词典API key给我用来测试~ 爱你哦 （づ￣3￣）づ╭❤～\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsweeticelolly%2Fqq_msdoc_bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsweeticelolly%2Fqq_msdoc_bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsweeticelolly%2Fqq_msdoc_bot/lists"}