Arthals

Arthals

bilibili
github

PKU NEWS

Hot List?#

As a gossip enthusiast who has been intensively browsing the tree hole every day since the beginning of school, I have always wondered why the tree hole does not have a hot list function. By searching for hot list keywords, I also learned that there were predecessors who were doing this, but they stopped updating later, which is a pity.

So since the end of last year, I had an idea: why don't I make a hot list myself? But due to the heavy workload during the semester, this idea has only stayed at the step of purchasing the pku.news domain name and has made no progress (actually, I was just slacking off too much). Finally, after the winter vacation following the completion of the general chemistry exam, I picked up this idea again and started to put it into practice.

Hot List...#

This project spanned my entire winter vacation, from backend data crawling, database establishment, API interfaces, to the domain name registration that took me more than a week to complete, and then to the frontend HTML and CSS coding (writing everything without knowing anything), and learning the Vue framework (roughly watching a few episodes of Bilibili tutorials). It is actually not a big project, but due to my addiction to games and low study efficiency, it took me until now to finish it orz.

Hot List!#

But no matter what, this small project that I wrote step by step can be considered basically completed (there may still be some small animations and details on the pages that haven't been dealt with). Now everyone can visit pku.news or pekinguniversity.top at any time to get the hot list data from the past day/week/month, satisfy their gossip desires anytime and anywhere, and make up for the regret of missing out on hot holes due to studying!

Monitoring Process#

First, the data source is obtained every half an hour, including the recent 100 pages (about 3000 posts) of replies and followers in the tree hole, and stored in the local database.

Secondly, for all posts within the 100 pages, those that meet the following criteria are added to the monitoring list: heat *≥100, replies≥80, followers≥50.

For all data in the monitoring list, monitoring and updating will be maintained for the following week. If any posts are deleted, they will be removed from the entire database.

Based on various indicators, the top ten posts for each day/week/month are sorted and summarized on the webpage.

Heat = replies * 2 + followers * 3

Repository#

(Only extremely rudimentary frontend pages, the backend program is no longer applicable)

If you have any suggestions for improvement, ideas, or technical exchanges (Xinke experts, please come and guide this newbie!), please feel free to submit an issue/PR.

Technology Stack#

(This small project can also be called a technology stack?)

Backend: Python+PyMySQL+FastAPI

Frontend: Vue.js

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.