update UA
This commit is contained in:
parent
c3dc374786
commit
4a28fb3217
@ -138,10 +138,16 @@ def get_servers_from_subscribe_url(url):
|
||||
try:
|
||||
host = match(r"^(?:(?:https?)|(?:file)):\/\/([\w\.]*?)(?:[\/\?\#].*)?$", url)[1]
|
||||
req = request.Request(url, headers={
|
||||
"Host": host,
|
||||
"User-Agent": "Mozilla/5.0 (X11; Linux x86_64; rv:98.0) Gecko/20100101 Firefox/98.0",
|
||||
"Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8",
|
||||
"User-Agent": "Mozilla/5.0 (X11; Linux x86_64; rv:135.0) Gecko/20100101 Firefox/135.0",
|
||||
"Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",
|
||||
"Accept-Language": "zh-CN,zh;q=0.7,en;q=0.3",
|
||||
"Connection": "keep-alive",
|
||||
"Upgrade-Insecure-Requests": "1",
|
||||
"Sec-Fetch-Dest": "document",
|
||||
"Sec-Fetch-Mode": "navigate",
|
||||
"Sec-Fetch-Site": "cross-site",
|
||||
"Priority": "u=0, i",
|
||||
"TE": "trailers",
|
||||
}, method="GET")
|
||||
data = request.urlopen(req, timeout=5.0).read()
|
||||
try:
|
||||
|
Loading…
x
Reference in New Issue
Block a user