Coder Social home page Coder Social logo

catchwechat's Introduction

CatchWechat

抓取微信公众号文章

pre: 没有用框架,直接clone 就可以用

延伸:

 安装 pip

wget --no-check-certificate https://github.com/pypa/pip/archive/1.5.5.tar.gz 
tar zvxf 1.5.5.tar.gz    
cd pip-1.5.5/
python setup.py install
pip install --upgrade pip

 使用到的 pip 模块

pip install requests
pip install lxml
pip install BeautifulSoup

# Ubantu
apt-get install libmysqld-dev
easy_install MySQL-python

# Centos
yum install python-devel
yum install mysql-devel

获取代码

cd /home/wwwroot
git clone https://github.com/leon0204/catchWecaht.git

导入模板数据库,先创建 weixin 数据库 utf8mb4

cd catchWecaht
mysql -uroot -p weixin < ./weixin.sql

抓取公众号的列表在 weixin 数据库的 subscription 表中

配置所需要用到的库,没有的用 pip 基本都可以满足

抓取公众号今日更新列表

// 需要设置一下 dailydown.py 中的数据库设置
python dailydown.py

数据会存在 subcatch 表中

优化

1 资源删除,热点抓取bug 修复

TODO :

  1. dailyKeyword 采集热点关键词时,空数据时候插入,没数据是不会插入,没有写插入语句
  2. ~~图片采集的优化 ~~
  3. 添加TDK

更新 v1

  1. 优化图片采集规则,更全面抓取图片
  2. 修复一些bug

如果对你有帮助的话,帮忙右上角star一下,谢谢! 欢迎 PR ~

catchwechat's People

Contributors

leon0204 avatar

Watchers

James Cloos 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.