|
@@ -28,8 +28,8 @@ response = requests.get('https://gitlab.com/ineo6/hosts/-/raw/master/next-hosts'
|
|
speedHostStr = response.text
|
|
speedHostStr = response.text
|
|
print(speedHostStr)
|
|
print(speedHostStr)
|
|
|
|
|
|
-start = "github start"
|
|
|
|
-end = "github end"
|
|
|
|
|
|
+start = "#github start"
|
|
|
|
+end = "#github end"
|
|
speedHostStr = start + "\n" + speedHostStr + "\n" + end + "\n"
|
|
speedHostStr = start + "\n" + speedHostStr + "\n" + end + "\n"
|
|
|
|
|
|
# 如果已经存在,则替换
|
|
# 如果已经存在,则替换
|
|
@@ -42,3 +42,6 @@ print("*" * 100)
|
|
print(allHostStr)
|
|
print(allHostStr)
|
|
# 写入hosts
|
|
# 写入hosts
|
|
open(host_path, 'w', encoding='utf-8').write(allHostStr)
|
|
open(host_path, 'w', encoding='utf-8').write(allHostStr)
|
|
|
|
+
|
|
|
|
+print("*" * 100)
|
|
|
|
+print("写入完成")
|