提交 d4c975ad 编写于 作者: 6 62f3568c7066201db17ad50a

更新了资源网站

上级 2b4dc927
......@@ -198,3 +198,152 @@
2022-11-18 04:35:02,140 - werkzeug - INFO - 127.0.0.1 - - [18/Nov/2022 04:35:02] "GET /_static/src/browser/pages/error.css HTTP/1.1" 404 -
2022-11-18 04:35:02,449 - werkzeug - INFO - 127.0.0.1 - - [18/Nov/2022 04:35:02] "GET /manifest.json HTTP/1.1" 404 -
2022-11-18 04:35:32,402 - werkzeug - INFO - 127.0.0.1 - - [18/Nov/2022 04:35:32] "GET / HTTP/1.1" 200 -
2022-11-23 12:16:34,266 - werkzeug - INFO - WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
* Running on all addresses (0.0.0.0)
* Running on http://127.0.0.1:5000
* Running on http://192.168.1.81:5000
2022-11-23 12:16:34,266 - werkzeug - INFO - Press CTRL+C to quit
2022-11-23 12:16:34,267 - werkzeug - INFO - * Restarting with stat
2022-11-23 12:16:34,449 - werkzeug - WARNING - * Debugger is active!
2022-11-23 12:16:34,457 - werkzeug - INFO - * Debugger PIN: 280-579-558
2022-11-23 12:16:36,359 - werkzeug - INFO - 127.0.0.1 - - [23/Nov/2022 12:16:36] "GET / HTTP/1.1" 200 -
2022-11-23 12:17:24,090 - root - DEBUG - Get token from token_url='http://kelezj.com/v/api/gettoken'
2022-11-23 12:17:24,093 - urllib3.connectionpool - DEBUG - Starting new HTTP connection (1): kelezj.com:80
2022-11-23 12:17:24,455 - root - ERROR - ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer')): The url of get token is not normal, please check service configruation now!
2022-11-23 12:17:24,455 - werkzeug - INFO - 127.0.0.1 - - [23/Nov/2022 12:17:24] "GET /api/video/1 HTTP/1.1" 200 -
2022-11-23 12:17:49,678 - werkzeug - INFO - * Detected change in '/ide/workspace/magic-pig/service/video/video_service.py', reloading
2022-11-23 12:17:49,705 - werkzeug - INFO - * Restarting with stat
2022-11-23 12:20:57,489 - werkzeug - INFO - WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
* Running on all addresses (0.0.0.0)
* Running on http://127.0.0.1:5000
* Running on http://192.168.1.81:5000
2022-11-23 12:20:57,489 - werkzeug - INFO - Press CTRL+C to quit
2022-11-23 12:20:57,489 - werkzeug - INFO - * Restarting with stat
2022-11-23 12:20:57,655 - werkzeug - WARNING - * Debugger is active!
2022-11-23 12:20:57,655 - werkzeug - INFO - * Debugger PIN: 280-579-558
2022-11-23 12:21:00,166 - root - DEBUG - Get token from token_url='http://kelezj.com/v/api/gettoken'
2022-11-23 12:21:00,169 - urllib3.connectionpool - DEBUG - Starting new HTTP connection (1): kelezj.com:80
2022-11-23 12:21:00,585 - root - ERROR - ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer')): The url of get token is not normal, please check service configruation now!
2022-11-23 12:21:00,586 - werkzeug - INFO - 127.0.0.1 - - [23/Nov/2022 12:21:00] "GET /api/video/1 HTTP/1.1" 200 -
2022-11-23 12:21:07,459 - werkzeug - INFO - 127.0.0.1 - - [23/Nov/2022 12:21:07] "GET /api/video/1 HTTP/1.1" 200 -
2022-11-23 12:21:19,460 - werkzeug - INFO - 127.0.0.1 - - [23/Nov/2022 12:21:19] "GET /api/video/1 HTTP/1.1" 200 -
2022-11-23 12:21:21,035 - werkzeug - INFO - 127.0.0.1 - - [23/Nov/2022 12:21:21] "GET /api/video/1 HTTP/1.1" 200 -
2022-11-23 12:21:39,748 - werkzeug - INFO - * Detected change in '/ide/workspace/magic-pig/service/video/video_service.py', reloading
2022-11-23 12:21:39,775 - werkzeug - INFO - * Restarting with stat
2022-11-23 12:21:39,945 - werkzeug - WARNING - * Debugger is active!
2022-11-23 12:21:39,945 - werkzeug - INFO - * Debugger PIN: 280-579-558
2022-11-23 12:21:52,669 - root - DEBUG - Get token from token_url='http://kelezj.com/v/api/gettoken'
2022-11-23 12:21:52,671 - urllib3.connectionpool - DEBUG - Starting new HTTP connection (1): kelezj.com:80
2022-11-23 12:21:52,731 - root - ERROR - ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer')): The url of get token is not normal, please check service configruation now!
2022-11-23 12:21:52,732 - werkzeug - INFO - 127.0.0.1 - - [23/Nov/2022 12:21:52] "GET /api/video/1 HTTP/1.1" 200 -
2022-11-23 12:22:53,736 - werkzeug - INFO - 127.0.0.1 - - [23/Nov/2022 12:22:53] "GET /api/video/1 HTTP/1.1" 200 -
2022-11-23 12:22:54,861 - werkzeug - INFO - 127.0.0.1 - - [23/Nov/2022 12:22:54] "GET /api/video/1 HTTP/1.1" 200 -
2022-11-23 12:22:56,152 - werkzeug - INFO - 127.0.0.1 - - [23/Nov/2022 12:22:56] "GET /api/video/1 HTTP/1.1" 200 -
2022-11-23 12:23:44,253 - werkzeug - INFO - * Detected change in '/ide/workspace/magic-pig/service/video/video_service.py', reloading
2022-11-23 12:23:44,283 - werkzeug - INFO - * Restarting with stat
2022-11-23 12:23:44,450 - werkzeug - WARNING - * Debugger is active!
2022-11-23 12:23:44,450 - werkzeug - INFO - * Debugger PIN: 280-579-558
2022-11-23 12:30:32,330 - werkzeug - INFO - * Detected change in '/ide/workspace/magic-pig/service/video/video_service.py', reloading
2022-11-23 12:30:32,359 - werkzeug - INFO - * Restarting with stat
2022-11-23 12:30:32,527 - werkzeug - WARNING - * Debugger is active!
2022-11-23 12:30:32,527 - werkzeug - INFO - * Debugger PIN: 280-579-558
2022-11-23 12:30:37,540 - werkzeug - INFO - * Detected change in '/ide/workspace/magic-pig/service/video/video_service.py', reloading
2022-11-23 12:30:37,567 - werkzeug - INFO - * Restarting with stat
2022-11-23 12:30:37,784 - werkzeug - WARNING - * Debugger is active!
2022-11-23 12:30:37,784 - werkzeug - INFO - * Debugger PIN: 280-579-558
2022-11-23 12:30:38,789 - werkzeug - INFO - * Detected change in '/ide/workspace/magic-pig/service/video/video_service.py', reloading
2022-11-23 12:30:38,815 - werkzeug - INFO - * Restarting with stat
2022-11-23 12:32:40,261 - werkzeug - INFO - WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
* Running on all addresses (0.0.0.0)
* Running on http://127.0.0.1:5000
* Running on http://192.168.1.81:5000
2022-11-23 12:32:40,261 - werkzeug - INFO - Press CTRL+C to quit
2022-11-23 12:32:40,262 - werkzeug - INFO - * Restarting with stat
2022-11-23 12:32:40,429 - werkzeug - WARNING - * Debugger is active!
2022-11-23 12:32:40,430 - werkzeug - INFO - * Debugger PIN: 280-579-558
2022-11-23 12:32:57,439 - root - DEBUG - Get token from token_url='/v/api/gettoken'
2022-11-23 12:32:57,442 - urllib3.connectionpool - DEBUG - Starting new HTTP connection (1): s.sxrrr.com:80
2022-11-23 12:32:58,462 - urllib3.connectionpool - DEBUG - http://s.sxrrr.com:80 "GET /v/api/gettoken HTTP/1.1" 200 54
2022-11-23 12:32:58,463 - root - DEBUG - Get token success: token={'token': '1ss9o6ge9o8', 'user': ['201216shus', '2060sn']}
2022-11-23 12:32:58,463 - root - DEBUG - Get token successed! Write to ./resource/token_backup
2022-11-23 12:32:58,463 - root - DEBUG - Get PAYLOAD={'name': '1', 'token': '1ss9o6ge9o8', 'tabN': 'movie_201216shus', 'topNo': 10, 'whr': 'question like "%1%" or byname like "%1%"', 'orderBy': 'isTop DESC, date_time', 'orderType': 'DESC', 'keys': 'question,answer,isTop,id'}
2022-11-23 12:32:58,465 - urllib3.connectionpool - DEBUG - Starting new HTTP connection (1): s.sxrrr.com:80
2022-11-23 12:32:58,780 - urllib3.connectionpool - DEBUG - http://s.sxrrr.com:80 "POST /v/api/getJuzi HTTP/1.1" 200 None
2022-11-23 12:32:58,780 - root - DEBUG - /v/api/getJuzi: <Response [200]>
2022-11-23 12:32:58,782 - urllib3.connectionpool - DEBUG - Starting new HTTP connection (1): s.sxrrr.com:80
2022-11-23 12:32:59,462 - urllib3.connectionpool - DEBUG - http://s.sxrrr.com:80 "POST /v/api/sortWeb HTTP/1.1" 200 319
2022-11-23 12:32:59,463 - root - DEBUG - /v/api/sortWeb: <Response [200]>
2022-11-23 12:32:59,466 - urllib3.connectionpool - DEBUG - Starting new HTTP connection (1): s.sxrrr.com:80
2022-11-23 12:32:59,784 - urllib3.connectionpool - DEBUG - http://s.sxrrr.com:80 "POST /v/api/getTop HTTP/1.1" 200 21
2022-11-23 12:32:59,785 - root - DEBUG - /v/api/getTop: <Response [200]>
2022-11-23 12:32:59,787 - urllib3.connectionpool - DEBUG - Starting new HTTP connection (1): s.sxrrr.com:80
2022-11-23 12:33:00,105 - urllib3.connectionpool - DEBUG - http://s.sxrrr.com:80 "POST /v/api/getDyfx HTTP/1.1" 200 21
2022-11-23 12:33:00,106 - root - DEBUG - /v/api/getDyfx: <Response [200]>
2022-11-23 12:33:00,107 - urllib3.connectionpool - DEBUG - Starting new HTTP connection (1): s.sxrrr.com:80
2022-11-23 12:33:00,425 - urllib3.connectionpool - DEBUG - http://s.sxrrr.com:80 "POST /v/api/getTTZJB HTTP/1.1" 200 21
2022-11-23 12:33:00,426 - root - DEBUG - /v/api/getTTZJB: <Response [200]>
2022-11-23 12:33:00,427 - urllib3.connectionpool - DEBUG - Starting new HTTP connection (1): s.sxrrr.com:80
2022-11-23 12:33:00,749 - urllib3.connectionpool - DEBUG - http://s.sxrrr.com:80 "POST /v/api/getGirls HTTP/1.1" 200 None
2022-11-23 12:33:00,750 - root - DEBUG - /v/api/getGirls: <Response [200]>
2022-11-23 12:33:00,752 - urllib3.connectionpool - DEBUG - Starting new HTTP connection (1): s.sxrrr.com:80
2022-11-23 12:33:01,067 - urllib3.connectionpool - DEBUG - http://s.sxrrr.com:80 "POST /v/api/getXiaoy HTTP/1.1" 200 48
2022-11-23 12:33:01,068 - root - DEBUG - /v/api/getXiaoy: <Response [200]>
2022-11-23 12:33:01,070 - urllib3.connectionpool - DEBUG - Starting new HTTP connection (1): s.sxrrr.com:80
2022-11-23 12:33:01,391 - urllib3.connectionpool - DEBUG - http://s.sxrrr.com:80 "POST /v/api/getGGang HTTP/1.1" 404 152
2022-11-23 12:33:01,391 - root - DEBUG - /v/api/getGGang: <Response [404]>
2022-11-23 12:33:01,399 - werkzeug - INFO - 127.0.0.1 - - [23/Nov/2022 12:33:01] "GET /api/video/1 HTTP/1.1" 500 -
2022-11-23 12:33:01,499 - werkzeug - INFO - 127.0.0.1 - - [23/Nov/2022 12:33:01] "GET /api/video/1?__debugger__=yes&cmd=resource&f=style.css HTTP/1.1" 200 -
2022-11-23 12:33:01,573 - werkzeug - INFO - 127.0.0.1 - - [23/Nov/2022 12:33:01] "GET /api/video/1?__debugger__=yes&cmd=resource&f=debugger.js HTTP/1.1" 200 -
2022-11-23 12:33:01,653 - werkzeug - INFO - 127.0.0.1 - - [23/Nov/2022 12:33:01] "GET /api/video/1?__debugger__=yes&cmd=resource&f=console.png HTTP/1.1" 200 -
2022-11-23 12:35:36,822 - werkzeug - INFO - * Detected change in '/ide/workspace/magic-pig/service/video/video_service.py', reloading
2022-11-23 12:35:36,850 - werkzeug - INFO - * Restarting with stat
2022-11-23 12:40:04,242 - werkzeug - INFO - WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
* Running on all addresses (0.0.0.0)
* Running on http://127.0.0.1:5000
* Running on http://192.168.1.81:5000
2022-11-23 12:40:04,242 - werkzeug - INFO - Press CTRL+C to quit
2022-11-23 12:40:04,243 - werkzeug - INFO - * Restarting with stat
2022-11-23 12:40:04,420 - werkzeug - WARNING - * Debugger is active!
2022-11-23 12:40:04,421 - werkzeug - INFO - * Debugger PIN: 280-579-558
2022-11-23 12:40:06,965 - root - DEBUG - Get token from token_url='/v/api/gettoken'
2022-11-23 12:40:06,967 - urllib3.connectionpool - DEBUG - Starting new HTTP connection (1): s.sxrrr.com:80
2022-11-23 12:40:07,287 - urllib3.connectionpool - DEBUG - http://s.sxrrr.com:80 "GET /v/api/gettoken HTTP/1.1" 200 54
2022-11-23 12:40:07,288 - root - DEBUG - Get token success: token={'token': 'svlvn009upg', 'user': ['201216shus', '2060sn']}
2022-11-23 12:40:07,288 - root - DEBUG - Get token successed! Write to ./resource/token_backup
2022-11-23 12:40:07,289 - root - DEBUG - Get PAYLOAD={'name': '1', 'token': 'svlvn009upg', 'tabN': 'movie_201216shus', 'topNo': 10, 'whr': 'question like "%1%" or byname like "%1%"', 'orderBy': 'isTop DESC, date_time', 'orderType': 'DESC', 'keys': 'question,answer,isTop,id'}
2022-11-23 12:40:07,290 - urllib3.connectionpool - DEBUG - Starting new HTTP connection (1): s.sxrrr.com:80
2022-11-23 12:40:08,362 - urllib3.connectionpool - DEBUG - http://s.sxrrr.com:80 "POST /v/api/getJuzi HTTP/1.1" 200 None
2022-11-23 12:40:08,363 - root - DEBUG - /v/api/getJuzi: <Response [200]>
2022-11-23 12:40:08,364 - urllib3.connectionpool - DEBUG - Starting new HTTP connection (1): s.sxrrr.com:80
2022-11-23 12:40:08,718 - urllib3.connectionpool - DEBUG - http://s.sxrrr.com:80 "POST /v/api/sortWeb HTTP/1.1" 200 319
2022-11-23 12:40:08,719 - root - DEBUG - /v/api/sortWeb: <Response [200]>
2022-11-23 12:40:08,721 - urllib3.connectionpool - DEBUG - Starting new HTTP connection (1): s.sxrrr.com:80
2022-11-23 12:40:09,036 - urllib3.connectionpool - DEBUG - http://s.sxrrr.com:80 "POST /v/api/getTop HTTP/1.1" 200 21
2022-11-23 12:40:09,037 - root - DEBUG - /v/api/getTop: <Response [200]>
2022-11-23 12:40:09,039 - urllib3.connectionpool - DEBUG - Starting new HTTP connection (1): s.sxrrr.com:80
2022-11-23 12:40:09,357 - urllib3.connectionpool - DEBUG - http://s.sxrrr.com:80 "POST /v/api/getDyfx HTTP/1.1" 200 21
2022-11-23 12:40:09,358 - root - DEBUG - /v/api/getDyfx: <Response [200]>
2022-11-23 12:40:09,360 - urllib3.connectionpool - DEBUG - Starting new HTTP connection (1): s.sxrrr.com:80
2022-11-23 12:40:09,682 - urllib3.connectionpool - DEBUG - http://s.sxrrr.com:80 "POST /v/api/getTTZJB HTTP/1.1" 200 21
2022-11-23 12:40:09,683 - root - DEBUG - /v/api/getTTZJB: <Response [200]>
2022-11-23 12:40:09,684 - urllib3.connectionpool - DEBUG - Starting new HTTP connection (1): s.sxrrr.com:80
2022-11-23 12:40:10,631 - urllib3.connectionpool - DEBUG - http://s.sxrrr.com:80 "POST /v/api/getGirls HTTP/1.1" 200 None
2022-11-23 12:40:10,631 - root - DEBUG - /v/api/getGirls: <Response [200]>
2022-11-23 12:40:10,633 - urllib3.connectionpool - DEBUG - Starting new HTTP connection (1): s.sxrrr.com:80
2022-11-23 12:40:10,949 - urllib3.connectionpool - DEBUG - http://s.sxrrr.com:80 "POST /v/api/getXiaoy HTTP/1.1" 200 48
2022-11-23 12:40:10,950 - root - DEBUG - /v/api/getXiaoy: <Response [200]>
2022-11-23 12:40:10,951 - urllib3.connectionpool - DEBUG - Starting new HTTP connection (1): s.sxrrr.com:80
2022-11-23 12:40:11,269 - urllib3.connectionpool - DEBUG - http://s.sxrrr.com:80 "POST /v/api/getGGang HTTP/1.1" 404 152
2022-11-23 12:40:11,270 - root - DEBUG - /v/api/getGGang: <Response [404]>
2022-11-23 12:40:11,270 - root - DEBUG - /v/api/getGGang: Get text is not a json, <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Error</title>
</head>
<body>
<pre>Cannot POST /api/getGGang</pre>
</body>
</html>
2022-11-23 12:40:11,271 - werkzeug - INFO - 127.0.0.1 - - [23/Nov/2022 12:40:11] "GET /api/video/1 HTTP/1.1" 200 -
http://s.sxrrr.com
\ No newline at end of file
http://kelezj.com/v/api/getJuzi
http://kelezj.com/v/api/sortWeb
http://kelezj.com/v/api/getTop
http://kelezj.com/v/api/getDyfx
http://kelezj.com/v/api/getTTZJB
http://kelezj.com/v/api/getGirls
http://kelezj.com/v/api/getXiaoy
http://kelezj.com/v/api/getGGang
\ No newline at end of file
/v/api/getJuzi
/v/api/sortWeb
/v/api/getTop
/v/api/getDyfx
/v/api/getTTZJB
/v/api/getGirls
/v/api/getXiaoy
\ No newline at end of file
http://kelezj.com/v/api/gettoken
\ No newline at end of file
/v/api/gettoken
\ No newline at end of file
{"token": "qp8j3mqkvh", "user": "movie_211229kl"}
\ No newline at end of file
{"token": "svlvn009upg", "user": "movie_201216shus"}
\ No newline at end of file
from cgitb import enable
import requests
import logging
import json
......@@ -17,6 +18,9 @@ PAYLOAD = {
"keys": "question,answer,isTop,id"
}
with open('./resource/video/domain', 'r') as file:
domain = file.readline()
IS_TOKEN = True
TOKEN_ERROR = 'CANNOT_GET_TOKEN_ERROR'
......@@ -30,7 +34,7 @@ def get_token_by_request():
with open('./resource/video/token', 'r') as file:
token_url = file.readline()
logging.debug(f'Get token from {token_url=}')
return requests.get(token_url, headers=HEADER).json()
return requests.get(domain + token_url, headers=HEADER).json()
def get_token():
global IS_TOKEN
......@@ -73,11 +77,23 @@ def get_resource_by_token(token, name):
for url in urls:
try:
url = url.replace('\n', '')
video = requests.post(url, headers=HEADER, data=PAYLOAD)
video = requests.post(domain + url, headers=HEADER, data=PAYLOAD)
logging.debug(f'{url}: {video}')
if not check_json_format(video.text):
logging.debug(f'{url}: Get text is not a json, {video.text}')
continue
video = video.json()
if len(video['list']) > 0:
video_list.append(video['list'])
except Exception as e:
logging(f'{e}:Get video resource from {url} failed!')
return video_list
def check_json_format(raw_msg):
if isinstance(raw_msg, str):
try:
json.loads(raw_msg, encoding='utf-8')
except ValueError:
return False
return True
return False
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册