Coder Social home page Coder Social logo

yiguan's Introduction

爬取一罐的罐子详情

USAGE

  1. 创建数据库配置文件config.ini

    参见config.ini.template

  2. 运行main.py

库&表结构

CREATE DATABASE `yi_guan`;
CREATE TABLE `thread` (
  `primary_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
  `id` varchar(20) DEFAULT NULL COMMENT '帖子id',
  `mid` varchar(20) DEFAULT NULL COMMENT '版块id',
  `tid` varchar(20) DEFAULT NULL COMMENT '不知道什么东西',
  `text` varchar(2048) DEFAULT NULL COMMENT '正文',
  `age` varchar(8) DEFAULT NULL COMMENT '年龄',
  `gender` int(11) DEFAULT NULL COMMENT '性别',
  `photos` varchar(2048) DEFAULT NULL COMMENT '附带的照片',
  `nickname` varchar(32) DEFAULT NULL COMMENT '昵称',
  `weather` varchar(16) DEFAULT NULL COMMENT '当地天气',
  `temperature` varchar(16) DEFAULT NULL COMMENT '当地气温',
  `createTime` bigint(20) DEFAULT NULL COMMENT '创建时间',
  `likedNum` int(11) DEFAULT NULL COMMENT '点赞数',
  `commentedNum` int(11) DEFAULT NULL COMMENT '评论数',
  `isLiked` smallint(6) DEFAULT NULL COMMENT '是否被点赞。只有登录才有效,所以爬取的时候这个字段无效',
  `score` varchar(20) DEFAULT NULL COMMENT '分页依据',
  `isTop` smallint(6) DEFAULT NULL COMMENT '是否被置顶',
  PRIMARY KEY (`primary_id`),
  UNIQUE KEY `id` (`id`,`createTime`,`mid`),
  KEY `idx_id` (`id`),
  KEY `idx_mid` (`mid`),
  KEY `idx_age` (`age`),
  KEY `idx_nickname` (`nickname`),
  KEY `idx_createTime` (`createTime`),
  KEY `idx_likedNum` (`likedNum`),
  KEY `idx_score` (`score`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='一罐帖子表';

yiguan's People

Contributors

bawuju 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.