From de4a4f476b26255895c9d3aa29d13281e65760a1 Mon Sep 17 00:00:00 2001 From: ngfchl Date: Sat, 27 Aug 2022 15:48:22 +0800 Subject: [PATCH] =?UTF-8?q?1.=20=E4=BF=AE=E5=A4=8D=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E7=AB=99=E7=82=B9=E6=97=B6=E6=9D=83=E9=99=90=E6=8B=92=E7=BB=9D?= =?UTF-8?q?=E7=9A=84bug=202.=20=E4=BF=AE=E5=A4=8DPT=E6=97=B6=E9=97=B4?= =?UTF-8?q?=E5=88=B7=E6=96=B0=E7=8A=B6=E6=80=81=E6=97=B6=E6=8A=A5=E9=94=99?= =?UTF-8?q?=E7=9A=84bug=203.=20=E4=BC=98=E5=8C=96=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E7=95=8C=E9=9D=A2=EF=BC=8C=E5=A2=9E=E5=8A=A0=E6=8F=90=E7=A4=BA?= =?UTF-8?q?=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pt_site/UtilityTool.py | 3 --- pt_site/admin.py | 4 ++-- templates/auto_pt/restart.html | 23 +++++++++++++++-------- 3 files changed, 17 insertions(+), 13 deletions(-) diff --git a/pt_site/UtilityTool.py b/pt_site/UtilityTool.py index c97883f..1438dfe 100644 --- a/pt_site/UtilityTool.py +++ b/pt_site/UtilityTool.py @@ -850,9 +850,6 @@ class PtSpider: # if '(' in my_bonus: # my_bonus = my_bonus.split('(')[0] - if site.url == 'https://www.pttime.org/': - my_sp = re.findall('-?\d+.?\d+', my_sp)[-1] - hr = ''.join(details_html.xpath(site.my_hr_rule)).split(' ')[0] my_hr = hr if hr else '0' diff --git a/pt_site/admin.py b/pt_site/admin.py index 10e3604..8a9cad2 100644 --- a/pt_site/admin.py +++ b/pt_site/admin.py @@ -206,8 +206,8 @@ class StatusInlines(admin.TabularInline): return False # 禁止删除按钮 - def has_delete_permission(self, request, obj=None): - return False + # def has_delete_permission(self, request, obj=None): + # return False # 禁止修改按钮 def has_change_permission(self, request, obj=None): diff --git a/templates/auto_pt/restart.html b/templates/auto_pt/restart.html index d6afc76..8a77383 100644 --- a/templates/auto_pt/restart.html +++ b/templates/auto_pt/restart.html @@ -8,7 +8,17 @@
- 更新日志 + + + + 更新提示 + + 获取更新 更新 @@ -16,12 +26,9 @@
- {#
    #} - {#
  • #} - {#
#} - +
本地日志
@@ -34,7 +41,7 @@ color="#0bbd87" {# :size="activity.size"#} :timestamp="update_note.date"> - +

@@ -44,7 +51,7 @@
- +
更新日志
@@ -57,7 +64,7 @@ color="#0bbd87" {# :size="activity.size"#} :timestamp="update_note.date"> - +