Giter Site home page Giter Site logo

wechat_article's Introduction

WeChat_Article

爬取微信公众号文章

注意,除非你要断点续传,否则删除目录下conf.ini和url.json再启动!!!!

image

使用方法:

1、下载并解压Chrome.rar
2、运行main.exe
3、填入信息,点击“启动”即可。


背景知识:

爬取微信公众号有三种方法:

  • 第一种:用搜狗微信公众号搜过,这个只能收到前10条;
  • 第二种:用fiddler或手机抓包,从访问链接去获得appmsg_token,发现虽然这个值就在html页面里,但只有抓包的数据里含有效值,直接访问的是空的,而且还有时效性。这样,每次都要抓包获取,就很麻烦。
  • 第三种:就是这种用公众号搜公众号的,虽然速度慢点,但便捷了不少。

程序原理:

通过selenium登录获取token和cookie,再自动爬取和下载


更新记录:

  1. 下载文章文字内容到txt
  2. 下载文章图片
  3. 保存HTML文件,并将图片链接指向本地
  4. 添加按时间范围下载
  5. 添加cookie登陆,不成功才selenium浏览器登陆
  6. 增加记住密码功能
  7. 修复一些问题,如requests卡死
  8. 添加按关键词下载
  9. 多线程优化下载速度
  10. 增加断点续传功能(可能存在bug,欢迎提issue)
  11. 拟增加备用公众号功能(暂未完成)
  12. 下载PDF格式

其他说明:

  • 爬取间隔太快,容易遇到“访问频繁”或“freq_control”,这时候可以删除cookie.json,再重新运行软件,换个号继续运行;

欢迎关注微信公众号:xfxuezhang

wechat_article's People

Contributors

1061700625 avatar songxf1024 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.