From f380f94b6e2227873bb053499a040aac9028bf28 Mon Sep 17 00:00:00 2001 From: 27942 Date: Mon, 1 Dec 2025 18:00:59 +0800 Subject: [PATCH] rgfewfger --- telegram/bot_session.session | Bin 28672 -> 28672 bytes telegram/sign.db | Bin 32768 -> 32768 bytes test.py | 5 ++- test1.py | 69 +---------------------------------- 4 files changed, 5 insertions(+), 69 deletions(-) diff --git a/telegram/bot_session.session b/telegram/bot_session.session index eede5675657428d74e69df1ff775a93a1c0bb15f..41bf9095c4f06b3094e57c9b294f318d3d028253 100644 GIT binary patch delta 433 zcmZp8z}WDBae@?+5cfnGCm^{oVTrz!1)C}Z|17>vz9YN_{D!~ndV*g_}E z7)bH3&0|w#JIY?gR>AgcvxUJ!)_Sd}S3WK>VP{~|WRPdcSKZpD*j6l%n^;s?o|u!J zT4Z5iV(ML)ui%^PmQ$Ij>+w^zdDs3`u|V~*41z2|3Xbk;MZ+4B6LTvob21ZiGc$Fa z-4&*-*l}GLs6?JYlttx#{?Zz^?8>B~%)}xyBMXb%{OtTpU1LSXsaJNrc1r>(V_?u^ z`RV(y{9TOQL0{Jp4^PKn1*gQKywu`MU9I!d)8<~;;s#bG%aYosXS>Jbpjc?0LU=}I zNouC9My1rWJ+HreffY!zY|7dHIap0;gQG%VVsU0}rmo7v&1~kuEX=wAHk)ItS(%u1 z?N3Zju~i4roBM1{7?}cWCm*r%U%ORc>;ap>I3^C}6{ADA4|A?`B>$1||-64)!v~Tizjp70v|$?fb8;5`u^_y@ZKQ IKAmq009KWVIRF3v delta 197 zcmZp8z}WDBae@?+z}<;5PC#;F!V-N6BX%|h{#ksTd`EZ<_zihexa;{u*yr*zO_no| zVq&k_>|*ecb>f7#o7v2RS(sHbwKm6CvobNO`B(C1^6%&S%U{nQ%zu?%lV5YQpu=6h$$#x68FeO$ z+iQpj1I=JWHG^++u>D2_W=XCyli3sWS-Adlo!RUtFo~<)P?C*-l~L4}fpOAn?qsgw z%=A2j%^?QHRz^lvMh1FjW=56UF`gNRuWYnrW02%v;HXGX%P61RB;O>%$@hqX|0Vw={@wgb z_$TmJ@u%=T;`ifw1cI9t4G!^5exxVK7&iHjo}CB-gSH|g17k<2#7?;3ll}C!0S)=f zz(1A$HUCQfO#c0RfBEbAgZZ!WYl7frL5I71lmFUDGCE8ax7Pp~!k~q2$mU@CjS9@- X+(whx6ZAJb3jE>PY?OUggi#y-ar8$^ diff --git a/test.py b/test.py index a562981..f316a53 100644 --- a/test.py +++ b/test.py @@ -44,10 +44,11 @@ def main(sql_info): proxies=proxies, ) - print(response.json()["address"]) + print(response.json()) if response.json()["address"] == sql_info.host: sql_info.start = 1 + sql_info.country = response.json()["country"] sql_info.save() break @@ -62,6 +63,6 @@ if __name__ == '__main__': with ThreadPoolExecutor(max_workers=100) as executor: for i in Ips.select(): executor.submit(main, i) - time.sleep(random.randint(1, 3)) + time.sleep(random.random()) # https://x.com/Websea_MY \ No newline at end of file diff --git a/test1.py b/test1.py index e184e15..1fdc36f 100644 --- a/test1.py +++ b/test1.py @@ -1,68 +1,3 @@ -import datetime -import requests +import random -headers = { - 'accept': 'application/json, text/plain, */*', - 'accept-language': 'zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6', - 'cache-control': 'no-cache', - 'dnt': '1', - 'origin': 'https://www.websea.com', - 'pragma': 'no-cache', - 'priority': 'u=1, i', - 'referer': 'https://www.websea.com/', - 'sec-ch-ua': '"Chromium";v="142", "Microsoft Edge";v="142", "Not_A Brand";v="99"', - 'sec-ch-ua-mobile': '?0', - 'sec-ch-ua-platform': '"Windows"', - 'sec-fetch-dest': 'empty', - 'sec-fetch-mode': 'cors', - 'sec-fetch-site': 'same-site', - 'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.0.0 Safari/537.36 Edg/142.0.0.0', -} - -# # 获取当前日期(UTC) -# today = datetime.datetime.now(datetime.timezone.utc).date() -# -# # 当天开始和结束时间 -# start_of_day = datetime.datetime.combine(today, datetime.time.min, tzinfo=datetime.timezone.utc) -# end_of_day = datetime.datetime.combine(today, datetime.time.max, tzinfo=datetime.timezone.utc) - -# 获取今天日期(本地时间,中国时区 UTC+8) -tz = datetime.timezone(datetime.timedelta(hours=8)) -today = datetime.datetime.now(tz).date() - -# 当天开始时间(北京时间 00:00) -start_of_day = datetime.datetime.combine(today, datetime.time.min, tzinfo=tz) -# 当天结束时间(北京时间 23:59:59.999999) -end_of_day = datetime.datetime.combine(today, datetime.time.max, tzinfo=tz) - -params = { - 'symbol': 'BTC-USDT', - 'period': '30min', - 'start': int(start_of_day.timestamp()), - 'end': int(end_of_day.timestamp()), -} - -response = requests.get('https://eapi.websea.com/webApi/market/getKline', params=params, headers=headers) -data = response.json()["result"]["data"] - -if not data: - print("没有获取到数据") -else: - # 当前价格 = 最新一条 K 线的 close - current_price = float(data[0]['close']) - - # 当天最高价 = 当天所有 K 线的 high - today_high = max(float(item['high']) for item in data) - # 当天最低价 = 当天所有 K 线的 low - today_low = min(float(item['low']) for item in data) - - # 24 小时涨幅计算(用最新一条 close 与 24 小时前的价格对比) - # 如果接口只能获取当天数据,可能不足 24 小时,可根据需求扩展 - # 假设获取过去 24 小时数据,使用第一条 K 线的 open 作为 24 小时前价格 - price_24h_ago = float(data[-1]['open']) - change_24h = (current_price - price_24h_ago) / price_24h_ago * 100 - - print(f"当前价格: {current_price}") - print(f"24小时涨幅: {change_24h:.2f}%") - print(f"当天最高价: {today_high}") - print(f"当天最低价: {today_low}") +print(random.random()) \ No newline at end of file