From 6e78eff1947c297eb6a8e67c8947b28e344cdcf9 Mon Sep 17 00:00:00 2001 From: lwl0608 Date: Tue, 7 May 2024 23:23:52 +0800 Subject: [PATCH] fix --- vas/sync_zone_moment_price.py | 31 +++++++++++++++++++++++++++++++ vas/unlock_zone_tp.py | 16 ++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 vas/sync_zone_moment_price.py create mode 100644 vas/unlock_zone_tp.py diff --git a/vas/sync_zone_moment_price.py b/vas/sync_zone_moment_price.py new file mode 100644 index 0000000..453d43b --- /dev/null +++ b/vas/sync_zone_moment_price.py @@ -0,0 +1,31 @@ +from lib.all import * + +col_zone_moment = MongoDB( + host="mongodb://root:Wishpal2024@dds-bp1a72ede37c55d4242490.mongodb.rds.aliyuncs.com:3717/admin", + port=3717, + db="zone_moment", + collection="zone_moment" +) + +col_zone_moment_price = MongoDB( + host="mongodb://root:Wishpal2024@dds-bp1a72ede37c55d4242490.mongodb.rds.aliyuncs.com:3717/admin", + port=3717, + db="vas", + collection="zone_moment_price" +) + +lis = col_zone_moment.find( + {"c_type": 1}, projection={"_id": 1, "price": 1} +) + +for m in lis: + mmid = safe_get_int(m, "_id") + price = safe_get_int(m, "price") + + vas_moment = col_zone_moment_price.find_one({"_id": mmid}) + vas_price = safe_get_int(vas_moment, "price") + + print(mmid, price, vas_price) + +col_zone_moment.close() +col_zone_moment_price.close() diff --git a/vas/unlock_zone_tp.py b/vas/unlock_zone_tp.py new file mode 100644 index 0000000..ea7deac --- /dev/null +++ b/vas/unlock_zone_tp.py @@ -0,0 +1,16 @@ +from lib.all import * + +tp_mid = 14573 +streamer_mids = [93, 140, 142, 135, 123, 139, 99, 98, 102, 141, 151, 101, 111, 95, 120, 119, 110, 113, 4, 115, 89, 106, 96, 109, 121, 94, 92, 148, 122, 107, 118, 134, 54525, 97, 132, 100, 144, 104, 87404, 38971] + + +def call(tpmid, streamer_mid): + param = { + "third_part_mids": [tpmid], "streamer_mid": streamer_mid + } + res = call_service("https://api.tiefen.fun/op/zone/unlock_third_partners", param) + print(tpmid, streamer_mid, res) + + +for smid in streamer_mids: + call(tp_mid, smid)