v0.2,不会接受字数大于5的展览查询,添加展览详细信息展示,返回详细错误信息

This commit is contained in:
2024-08-24 22:20:42 +08:00
parent 80a9b4d565
commit d5eeea6c80
11 changed files with 279 additions and 51 deletions

View File

@ -1,6 +1,7 @@
import os
import random
import datetime
import json
from pathlib import Path
from .config import config
@ -20,3 +21,8 @@ def convert_timestamp(timestamp) -> str:
将时间戳转换为日期格式
"""
return datetime.datetime.fromtimestamp(timestamp).strftime("%Y-%m-%d %H:%M:%S")
def extract_banner_url(value) -> str:
a = json.loads(value)
url = "https:"+a["banner"]["url"]
return url