GithubHelp home page GithubHelp logo

ustcbbs-archiver's Introduction

ustcbbs-archiver

--- Scripts to archive ustcbbs posts.

使用 Python 作为爬虫,获取 ustcbbs 的信息存入本地。

仍然处在开发中。

当前成果

可以将指定板块的所有文章的标题、链接、原始 HTML 源代码存入数据库。

使用示例

./download.py --help 可以查看使用方式

./download.py -i -b communist -s 1 -o /dev/shm/archive.db

工具

  • python3+requests+bs4
  • sqlite3

思路

  • 建议在网络环境良好的地方进行下载

正文区

  • http://bbs.ustc.edu.cn/cgi/bbsdoc?board=Linux 的文章数获取当前版面最大文章值
  • http://bbs.ustc.edu.cn/cgi/bbsdoc?board=Linux&start=12345 的方式获取链接对应的 时间,写入数据库
  • 遍历文章数添加数据库
  • 进行下载,将网页正文添加至数据库

进阶(未完成):

  • 对网页正文进行分析得到原文与发文相关信息,存入新数据库
  • 实现增量更新(根据时间)
  • 对附件进行下载

授权

MIT License

作者

Boyuan Yang ([email protected])

ustcbbs-archiver's People

Contributors

hosiet avatar

Stargazers

volltin avatar

Watchers

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