Giter Club home page Giter Club logo

wechatbot4xianyu's Introduction

🤖 微信订阅机器人

🐟 微信订阅机器人之闲鱼二手商品监控

🔨技术栈及库:

  • python3
  • itchat & wxpy
  • flask
  • flask-mail
  • Mysql + MongoDB + Redis
  • sqlachemy + mongoengine
  • Celery
  • Requests

细节

四个部分: 爬虫 | 交互式微信机器人 | 微信机器人web接口 | 推送
  • 爬虫

    实时爬取闲鱼商品存入Mysql数据库

  • 交互式微信机器人

    自动通过好友,好友订阅爬虫,将好友和需求存入MongoDB

  • 微信机器人web接口

    微信机器人服务接口,主要为推送提供API

  • 推送

    轮询Mysql商品数据库, 根据MongoDB中的数据做分类后请求API将信息推送至微信好友(订阅者)

流程
  • 启动web服务 -> 启动Celery队列任务

  • Celery 启动发出信号将下面四个任务跑起来

    • 爬虫运行
    • 交互式微信机器人运行
    • 更新MongoDB中的微信好友数据
    • 推送服务运行
微信机器人登录

方法一:

服务运行起则会请求登录, 使用 itchat 的回调,调用celery被动任务中的邮件服务,将二维码发送至自己的邮箱然后扫码登录。

方法二:

请求/login这个登录接口获取二维码扫码登录 [暂时行不通]

📌 TODO:

  • 爬虫:
    • 商品去重
  • 推送:
    • 完善商品推送
  • 登录: 控制邮件频率间隔

LICENSE

MIT License Copyright (c) 2019

仅作为学习与交流的项目.

wechatbot4xianyu's People

Contributors

beanwei avatar

Watchers

 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.