Skip to content
This repository was archived by the owner on Nov 4, 2024. It is now read-only.

Commit 03fcddf

Browse files
committed
让出80端口
1 parent c5cd3f0 commit 03fcddf

File tree

9 files changed

+24
-9
lines changed

9 files changed

+24
-9
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,9 @@ pip3 install -i https://mirrors.ustc.edu.cn/pypi/web/simple/ flask pymysql reque
5858
pip3 install tornado
5959
# 国内用户可以使用以下命令来替换上面命令
6060
pip3 install -i https://mirrors.ustc.edu.cn/pypi/web/simple/ tornado
61-
# 克隆本项目
61+
# 下载项目
62+
wget https://github.com/736248591/hdu_rank/archive/3.0.0.zip
63+
tar -zxvf 3.0.0.zip
6264
git clone https://github.com/736248591/hdu_rank.git
6365
# 进入项目
6466
cd hdu_rank

app.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#!/usr/bin/python3
12
import os
23
from typing import Optional
34

client/src/App.vue

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -779,11 +779,18 @@
779779
return '睡眠中'
780780
} else if (this.crawlStatus === 'stopped') {
781781
return '已停止'
782+
} else if (this.crawlStatus === 'disconnect') {
783+
return '未连接'
782784
}
783785
return ''
784786
},
785787
crawlStatusClass () {
786-
return this.crawlStatus !== 'stopped' ? 'text-primary' : 'text-danger'
788+
if (this.crawlStatus === 'disconnect') {
789+
return 'text-danger'
790+
} else if (this.crawlStatus === 'stopped') {
791+
return 'text-warning'
792+
}
793+
return 'text-primary'
787794
},
788795
formUidState () {
789796
return this.formUid ? this.formUid.length > 1 && this.formUid.length <= 16 && this.formUidFeedbackState !== false : null

hdu_crawl.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#!/usr/bin/python3
12
import re
23
import socket
34
import time

helper.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#!/usr/bin/python3
12
import pymysql
23
from pymysql import Connection, connect, cursors
34
import sys

run_tornado.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#!/usr/bin/python3
12
import platform
23
import sys
34

@@ -11,10 +12,12 @@
1112
from tornado.ioloop import IOLoop
1213
from app import app
1314

15+
port = 5000
1416
http_server = HTTPServer(WSGIContainer(app))
15-
http_server.listen(80)
17+
http_server.listen(port)
1618
os_string = platform.system()
17-
if sys != "Windows":
19+
print('Running on ' + os_string)
20+
if os_string != "Windows":
1821
http_server.start(0)
19-
print('Running on http://127.0.0.1/ (Press CTRL+C to quit)')
22+
print('Running on http://127.0.0.1:%s/ (Press CTRL+C to quit)' % (port,))
2023
IOLoop.instance().start()

static/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<!DOCTYPE html><html lang=zh><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1,shrink-to-fit=no"><link rel=icon href=/favicon.ico><title>杭电刷题排行榜</title><link href=/css/app.8016069c.css rel=preload as=style><link href=/css/chunk-vendors.7caabd5f.css rel=preload as=style><link href=/js/app.fc4de7e4.js rel=preload as=script><link href=/js/chunk-vendors.3c2e8c1b.js rel=preload as=script><link href=/css/chunk-vendors.7caabd5f.css rel=stylesheet><link href=/css/app.8016069c.css rel=stylesheet></head><body><noscript><strong>很抱歉,本网页无法脱离JavaScript运行。请更换浏览器或者启动浏览器的JavaScript功能。</strong></noscript><div id=app></div><script src=/js/chunk-vendors.3c2e8c1b.js></script><script src=/js/app.fc4de7e4.js></script></body></html>
1+
<!DOCTYPE html><html lang=zh><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1,shrink-to-fit=no"><link rel=icon href=/favicon.ico><title>杭电刷题排行榜</title><link href=/css/app.8016069c.css rel=preload as=style><link href=/css/chunk-vendors.7caabd5f.css rel=preload as=style><link href=/js/app.f95147f5.js rel=preload as=script><link href=/js/chunk-vendors.3c2e8c1b.js rel=preload as=script><link href=/css/chunk-vendors.7caabd5f.css rel=stylesheet><link href=/css/app.8016069c.css rel=stylesheet></head><body><noscript><strong>很抱歉,本网页无法脱离JavaScript运行。请更换浏览器或者启动浏览器的JavaScript功能。</strong></noscript><div id=app></div><script src=/js/chunk-vendors.3c2e8c1b.js></script><script src=/js/app.f95147f5.js></script></body></html>

static/js/app.fc4de7e4.js renamed to static/js/app.f95147f5.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

uwsgi.ini

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ wsgi-file = ./app.py
88
# 指定日志文件;如果使用 supervisors 需要注释掉,否则,supervisors 不能自动拉起 uwsgi 程序
99
logto2 = /tmp/uwsgi.log
1010
pidfile = /tmp/uwsgi.pid
11-
disable-logging: false
11+
disable-logging : false
1212
# 启用master进程
1313
master = true
1414
# 启用线程
15-
enable-threads = true
15+
# enable-threads = true
1616
# 启动2个工作进程
1717
processes = 2
1818
uid = hdurank

0 commit comments

Comments
 (0)