Update server.py
Browse files
server.py
CHANGED
|
@@ -427,8 +427,8 @@ def replace_ip_and_country_in_file(file_path):
|
|
| 427 |
# print(f"读取到的文件内容: {content}")
|
| 428 |
|
| 429 |
# 使用正则表达式匹配 "IP[xxx]国家[yyy]" 的格式
|
| 430 |
-
pattern = r'IP\[.*?\]国家\[.*?\]'
|
| 431 |
-
replacement = f'机子IP[{geo_info["ip"]}]
|
| 432 |
new_content = re.sub(pattern, replacement, content)
|
| 433 |
|
| 434 |
# print(f"替换后的内容: {new_content}")
|
|
|
|
| 427 |
# print(f"读取到的文件内容: {content}")
|
| 428 |
|
| 429 |
# 使用正则表达式匹配 "IP[xxx]国家[yyy]" 的格式
|
| 430 |
+
pattern = r'IP\[.*?\]国家\[.*?\]国家\[.*?\]'
|
| 431 |
+
replacement = f'机子IP[{geo_info["ip"]}]ISP[{geo_info["country"]}]ISP[{geo_info["isp"]}]'
|
| 432 |
new_content = re.sub(pattern, replacement, content)
|
| 433 |
|
| 434 |
# print(f"替换后的内容: {new_content}")
|