上篇文章 掘金排行前5000大佬 | 掘金文章排行 看這裏前端
項目地址:juejin-spidernode
歡迎 star ⭐⭐⭐⭐⭐,issueandroid
你們對排名仍是很感興趣的,這篇繼續介紹新功能。git
feature:程序員
node dailyrun.js
自動獲取數據、提取排名、打 git tag 、git push 到 origin已經實現的github
這裏只列出前 100,詳細請前往 掘金用戶排名(前5000,按用戶點贊總量)shell
更新時間是 20190821 早晨 8 點左右npm
🎉 等級,👍 點贊數,🏠公司編程
詳細前 5000 請看 掘金用戶排名(前5000,按關注者)json
更新時間是 20190821 早晨 8 點左右
🎉 等級,👦 關注數,🏠公司
文章裏面列出的是最新的,想要查看往期排行查看 github tag,選擇對應時間,便可查看
根目錄下 dailyrun.js
#!/usr/bin/env node
/** * 自動執行器 * 一、自動抓數據,運算排名 * 二、自動 git add、git commit、git tag、 git push */
const request = require('request-promise')
const shell = require('shelljs')
// 獲取當前時間
// http://quan.suning.com/getSysTime.do
// eslint-disable-next-line
;(async () => {
const { sysTime1 } = await request('http://quan.suning.com/getSysTime.do', {
json: true,
})
const timeStr = sysTime1.substr(0, 8)
// wait
shell.exec('npm run all')
// git
shell.exec('git add *')
shell.exec(`git commit -m 'chore: update ${timeStr}'`)
shell.exec('git push')
shell.exec(`git tag ${timeStr}`)
shell.exec('git push --tags')
})()
複製代碼
自動獲取當天時間,運行 獲取數據、計算排行、自動 git add、commit、tag、push
全部說之後天天 node dailyrun.js
,再查看 repo 排行頁面便可。
後面想作用戶排行變化,也就是點贊量排行列表添加一個相比昨日增長了多少點贊量。
也歡迎各位提出改進意見~
項目地址:juejin-spider
歡迎 star ⭐⭐⭐⭐⭐,issue
歡迎關注個人公衆號 雲影sky