Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

今日热榜项目TopList的Python实现,异步爬取微博热榜,知乎,V2EX,GIthub,通过Flask展示。

Notifications You must be signed in to change notification settings

LoseNine/TopList-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

8 Commits

Repository files navigation

pyTopList

今日热榜项目TopList的Python实现,灵感来源: 今日热榜tophubs/TopList,一个获取各大热门网站热门头条的聚合网站,使用Go语言编写,多协程异步快速抓取信息,预览:https://www.printf520.com/hot.html

用Python复现Go语言的TopList,使用python语言编写的异步爬虫

1.png

目录说明

TopList/
├── App
| |——__init__.py 项目初始化配置app
│ ├── GetHot.py 爬取热榜的爬虫程序
│ └── models.py SQLALchemy数据库模型
├── Config
│ └── config.py Flask项目的配置文件
├── static 静态文件
│ ├── css 
| ├── fonts
| ├── imgs 
│ └── js
├── templates 前端模板文件
│ └── index.html
├── test 写测试的
│ └── get.py
├── Server.py 项目的启动入口
└── README.md

安装教程

  1. 创建MYSQL数据库,如 toplist作为数据库名

  2. 编辑文件 Config/cofig.py

 SQLALCHEMY_DATABASE_URI='mysql://root:root@localhost/toplist' 连接你的数据库
  1. 运行Server.py后,运行爬虫程序App/GetHot.py爬取各大热榜

  2. 浏览测试

    • 打开http://127.0.0.1:8080/

About

今日热榜项目TopList的Python实现,异步爬取微博热榜,知乎,V2EX,GIthub,通过Flask展示。

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

AltStyle によって変換されたページ (->オリジナル) /