import requests
import json
import uuid
# Generate a unique identifier (UUID) and append "bywx" to it
uuid_str = str(uuid.uuid4()).replace("-", "") + "bywx"
# Construct the URL for the first HTTP POST request
url = "https://[Log in to view URL]"
params = {
"version": "5.2.1",
"version_code": "36",
"os": "android",
"os_version": "10",
"vendor": "Xiaomi",
"model": "MI 8 SE",
"app": "mogu",
"channel": "50",
"channel_type": "1",
"udid": uuid_str
}
headers = {
"user-agent": "Dart/2.17 (dart:io)",
"content-type": "application/json; charset=utf-8"
}
# Make the first HTTP POST request for user registration
response = requests.post(url, json={}, params=params, headers=headers)
if response.status_code == 200:
data = response.json()
user_id = int(data["result"]["id"])
token = data["result"]["token"]
# Construct the URL for the second HTTP POST request
url2 = "https://[Log in to view URL]"
params2 = {
"version": "5.2.1",
"version_code": "36",
"os": "android",
"os_version": "10",
"vendor": "Xiaomi",
"model": "MI 8 SE",
"app": "mogu",
"channel": "50",
"channel_type": "1",
"udid": uuid_str,
"id": user_id,
"token": token
}
# Make the second HTTP POST request to acquire specific nodes
payload = {"node_id": 40}
response2 = requests.post(url2, json=payload, params=params2, headers=headers)
if response2.status_code == 200:
data2 = response2.json()
ssr = data2["result"]["uri"]
tm = data2["result"]["trialExpiredAt"]
print(ssr + "\n\n" + tm)
else:
print("请求失败:" + str(response2.status_code))
else:
print("请求失败:" + str(response.status_code))
To embed this project on your website, copy the following code and paste it into your website's HTML: