diff --git a/pt.json b/pt.json index 09428c5..1f5f1af 100644 --- a/pt.json +++ b/pt.json @@ -3717,12 +3717,12 @@ "pk": 53, "fields": { "created_at": "2022-08-27T18:18:44.023", - "updated_at": "2022-10-16T17:57:02.734", + "updated_at": "2022-10-16T23:30:15.244", "url": "https://springsunday.net/", "name": "不可说", "logo": "https://springsunday.net/favicon.ico", "tracker": "springsunday.net", - "sign_in_support": true, + "sign_in_support": false, "get_torrent_support": false, "get_userinfo_support": true, "search_support": false, @@ -3875,7 +3875,7 @@ "pk": 55, "fields": { "created_at": "2022-08-27T21:57:23.449", - "updated_at": "2022-10-15T20:28:11.229", + "updated_at": "2022-10-16T23:05:32.709", "url": "https://pterclub.com/", "name": "这是猫站", "logo": "https://pterclub.com/favicon.ico", @@ -3885,7 +3885,7 @@ "get_userinfo_support": true, "search_support": false, "page_default": "torrents.php", - "page_sign_in": "attendance.php", + "page_sign_in": "attendance-ajax.php", "page_control_panel": "usercp.php", "page_detail": "details.php?id={}", "page_download": "download.php?id={}", @@ -4981,14 +4981,14 @@ "pk": 71, "fields": { "created_at": "2022-10-13T21:12:00.102", - "updated_at": "2022-10-15T20:28:11.277", + "updated_at": "2022-10-16T23:04:43.288", "url": "https://nextpt.net/", "name": "飞天拉面", "logo": "https://nextpt.net/favicon.ico", "tracker": "creditracker", - "sign_in_support": true, - "get_torrent_support": true, - "get_userinfo_support": true, + "sign_in_support": false, + "get_torrent_support": false, + "get_userinfo_support": false, "search_support": false, "page_default": "Torrents?type=0&systematics=2&keyword=", "page_sign_in": "Users/me", @@ -5436,11 +5436,11 @@ "pk": 14, "fields": { "created_at": "2022-08-17T22:13:42.752", - "updated_at": "2022-10-11T11:56:01.644", + "updated_at": "2022-10-16T22:47:23.392", "task": 1, "job_id": "更新个人数据", "trigger": "interval", - "task_exec": true, + "task_exec": false, "replace_existing": true, "expression_time": "5*3600", "start_date": "2022-08-17T22:13:00", @@ -5455,11 +5455,11 @@ "pk": 15, "fields": { "created_at": "2022-08-17T22:25:47.033", - "updated_at": "2022-10-11T11:55:45.465", + "updated_at": "2022-10-16T22:47:23.376", "task": 4, "job_id": "自动签到", "trigger": "interval", - "task_exec": true, + "task_exec": false, "replace_existing": true, "expression_time": "7*3600", "start_date": "2022-10-10T13:25:00", @@ -5493,11 +5493,11 @@ "pk": 17, "fields": { "created_at": "2022-09-20T15:10:06.547", - "updated_at": "2022-10-11T11:55:44.588", + "updated_at": "2022-10-16T22:47:23.362", "task": 1, "job_id": "每天23点50分获取", "trigger": "cron", - "task_exec": true, + "task_exec": false, "replace_existing": true, "expression_time": "50 23 * * *", "start_date": "2022-09-20T15:10:00", diff --git a/pt_site/UtilityTool.py b/pt_site/UtilityTool.py index 65e178d..4dcd6eb 100644 --- a/pt_site/UtilityTool.py +++ b/pt_site/UtilityTool.py @@ -926,6 +926,33 @@ class PtSpider: res = self.send_request(my_site=my_site, method=site.sign_in_method, url=url, data=eval(site.sign_in_params)) logger.info(res.status_code) + if 'pterclub.com' in site.url: + status = res.json().get('status') + logger.info('{}:{}'.format(site.name, status)) + ''' + { + "status": "0", + "data": "抱歉", + "message": "您今天已经签到过了,请勿重复刷新。" + } + { + "status": "1", + "data": " (签到已得12)", + "message": "

这是您的第 2 次签到,已连续签到 1 天。

本次签到获得 12 克猫粮。

" + } + ''' + if status == '0' or status == '1': + message = res.json().get('message') + signin_today.sign_in_today = True + signin_today.sign_in_info = message + signin_today.save() + return CommonResponse.success( + msg=message + ) + else: + return CommonResponse.success( + msg='签到失败!' + ) if 'hares.top' in site.url: code = res.json().get('code') # logger.info('白兔返回码:'+ type(code)) diff --git a/pt_site_site.json b/pt_site_site.json index 65b3c5a..09804b5 100644 --- a/pt_site_site.json +++ b/pt_site_site.json @@ -3574,11 +3574,11 @@ { "id": 53, "created_at": "2022-08-27 18:18:44.023000", - "updated_at": "2022-10-16 17:57:02.734983", + "updated_at": "2022-10-16 23:30:15.244421", "name": "不可说", "url": "https://springsunday.net/", "logo": "https://springsunday.net/favicon.ico", - "sign_in_support": 1, + "sign_in_support": 0, "get_torrent_support": 0, "get_userinfo_support": 1, "search_support": 0, @@ -3726,7 +3726,7 @@ { "id": 55, "created_at": "2022-08-27 21:57:23.449000", - "updated_at": "2022-10-15 20:28:11.229763", + "updated_at": "2022-10-16 23:05:32.709513", "name": "这是猫站", "url": "https://pterclub.com/", "logo": "https://pterclub.com/favicon.ico", @@ -3735,7 +3735,7 @@ "get_userinfo_support": 1, "search_support": 0, "page_default": "torrents.php", - "page_sign_in": "attendance.php", + "page_sign_in": "attendance-ajax.php", "page_detail": "details.php?id={}", "page_download": "download.php?id={}", "page_user": "userdetails.php?id={}", @@ -4790,13 +4790,13 @@ { "id": 71, "created_at": "2022-10-13 21:12:00.102150", - "updated_at": "2022-10-15 20:28:11.277934", + "updated_at": "2022-10-16 23:04:43.288266", "name": "飞天拉面", "url": "https://nextpt.net/", "logo": "https://nextpt.net/favicon.ico", - "sign_in_support": 1, - "get_torrent_support": 1, - "get_userinfo_support": 1, + "sign_in_support": 0, + "get_torrent_support": 0, + "get_userinfo_support": 0, "search_support": 0, "page_default": "Torrents?type=0&systematics=2&keyword=", "page_sign_in": "Users/me",