{"id":13456744,"url":"https://github.com/1061700625/WeChat_Article","last_synced_at":"2025-03-24T11:31:15.436Z","repository":{"id":162353837,"uuid":"171795016","full_name":"1061700625/WeChat_Article","owner":"1061700625","description":"爬取微信公众号文章","archived":false,"fork":false,"pushed_at":"2025-02-21T04:21:35.000Z","size":68402,"stargazers_count":740,"open_issues_count":4,"forks_count":138,"subscribers_count":14,"default_branch":"master","last_synced_at":"2025-02-21T04:29:25.277Z","etag":null,"topics":["pyqt5","python3","spider","wechat","wechat-article"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/1061700625.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":"2019-02-21T03:40:42.000Z","updated_at":"2025-02-21T04:21:38.000Z","dependencies_parsed_at":null,"dependency_job_id":"f99f9448-ad0e-45d3-97d8-ad148c50910c","html_url":"https://github.com/1061700625/WeChat_Article","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1061700625%2FWeChat_Article","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1061700625%2FWeChat_Article/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1061700625%2FWeChat_Article/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1061700625%2FWeChat_Article/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/1061700625","download_url":"https://codeload.github.com/1061700625/WeChat_Article/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245260830,"owners_count":20586479,"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":["pyqt5","python3","spider","wechat","wechat-article"],"created_at":"2024-07-31T08:01:27.007Z","updated_at":"2025-03-24T11:31:15.431Z","avatar_url":"https://github.com/1061700625.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# WeChat_Article    \n爬取微信公众号文章    \n\n\u003e Bilibili视频演示：https://www.bilibili.com/video/BV1vN411D7Y3/\n\n**注意，除非你要断点续传，否则删除目录下conf.ini和url.json再启动！！！！**\n\n![image](https://user-images.githubusercontent.com/31002981/217465357-d0737b23-55ec-47d3-b12c-ee8973a04291.png)\n\n\n## 使用方法：     \n1、下载并解压[**Chrome.rar**](https://sxf1024.lanzouo.com/iJ2Rp0mwy50j)；  \n2、下载并解压[default.zip](https://github.com/1061700625/WeChat_Article/releases)；  \n3、将解压的Chrome放到解压的default里；    \n4、进入default目录，运行**main.exe**；    \n5、填入信息，点击“**启动**”即可。    \n6、如果想修改UI，可以安装这个：[Qt Designer](https://build-system.fman.io/qt-designer-download)    \n****************************************************************************************************    \n\n## 背景知识:     \n使用公众号写文章时支持搜索其他公众号的文章的方式，来实现爬取指定公众号所有文章的目的。    \n****************************************************************************************************    \n\n## 程序原理:     \n通过selenium登录获取token和cookie，再自动爬取和下载   \n* 使用前提：   \n1、申请一个免费的微信公众号，个人订阅号即可(https://mp.weixin.qq.com)      \n****************************************************************************************************    \n\n## 更新记录：\n1. 下载文章文字内容到txt\n2. 下载文章图片\n3. 保存HTML文件，并将图片链接指向本地  \n4. 添加按时间范围下载  \n5. 添加cookie登陆，不成功才selenium浏览器登陆  \n6. 增加记住密码功能  \n7. 修复一些问题，如requests卡死  \n8. 添加按关键词下载  \n9. 多线程优化下载速度  \n10. 增加断点续传功能（可能存在bug，推荐不要用）  \n11. 拟增加备用公众号功能（暂未完成）  \n12. 下载PDF格式\n13. 不需要再手动下载Chrome，启动时会自动下载    \n**************************************************************************************************** \n\n## 使用说明：\n创建虚拟环境\n```bash\nconda create -n wechat python=3.9 -y\n```\n\n进入虚拟环境\n```bash\nconda activate wechat\n```\n\n安装三方库\n```bash\npip install -r requirements.txt\n```\n\u003e 对于mac用户，安装pyqt5可能会报错，可以尝试：\n\u003e ```bash\n\u003e brew install pyqt@5\n\u003e cp -r   /opt/homebrew/Cellar/pyqt@5/5.15.7_2/lib/python3.9/site-packages/*   /Users/songxf/miniconda3/envs/wechat/lib/python3.9/site-packages/   \n\u003e ```\n\u003e 然后就可以导入了：\n\u003e ```bash\n\u003e import PyQt5\n\u003e ```\n\n运行脚本\n```bash\npython main.py\n```\n\n打包exe(生成在dist下)\n```bash\npyinstaller -F -w -i icon.ico main.py\n```\n\n\n## 其他说明：\n- 爬取间隔太快，容易遇到“**访问频繁**”或“**freq_control**”，这时候可以删除**cookie.json**，再重新运行软件，**换个号**继续运行；\n- Qt打包完实在是太大了，有大佬会转成Tkinter吗？\n\n\n欢迎关注微信公众号：xfxuezhang\n\n# 相关项目\n\u003e 感谢大佬们的贡献 ♪(･ω･)ﾉ\n- [web版](https://github.com/wechat-article/wechat-article-exporter)\n- [QT6版](https://github.com/wooodypan/WeChat_Article)\n\n\n\n---\n## 打赏    \n如果这个项目帮助到了你，欢迎请我喝杯阔落👏🏻    \n![yf](yf.png)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F1061700625%2FWeChat_Article","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F1061700625%2FWeChat_Article","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F1061700625%2FWeChat_Article/lists"}