Code Monkey home page Code Monkey logo

fundsquery_plugins's Introduction

QQBot集资查询插件

简介

在QQ群内发送命令,查询某一用户的集资记录 demo示意图

思路介绍

  • 建立数据库,使用爬虫将微打赏或摩点的集资数据保存到数据库内
  • 通过QQBot设置相关查询语句,对接收到的消息内容进行切片处理(获取用户ID)
  • 通过pymysql模块对数据库进行操作,将上一步中获取到的用户ID作为参数填充到SQL语句中
  • 将查询结果进行处理(排版),通过QQBot发送至指定群内

依赖文件介绍

config.py

  • 配置文件,用于填写相关设置

wds_db.py

  • 用于抓取微打赏集资数据
  • 使用方法
    • 运行代码,输入微打赏pro_id
    • 重复上一步骤,直至将所有集资数据存入数据库
  • 注意事项:程序运行程序过程中会警告数据库已存在,忽略即可

modian_db.py

  • 用于抓取摩点集资数据
  • 使用方法同wds_db.py

query.py

  • 使用QQBot加载的查询插件
  • 需要修改的参数:
    • 查询命令(默认查询命令为“集资查询”)
    • msg中的小偶像名称

更新记录

2018.01.08更新:初次更新,内容包含查询插件querry.py和爬虫wds_db.pymodian_db.py,配置文件config.py

2018.01.10更新:紧急修复了modian_db.py中需要重复输入proid的BUG,优化了wds_db.pymodian_db.py的代码结构,增强了可读性

fundsquery_plugins's People

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.