MCPcopy
hub / github.com/VPN-Subcription-Links/ClashX-V2Ray-TopFreeProxy / fetch_html

Function fetch_html

combine/combine.py:38–49  ·  view source on GitHub ↗
(url: str)

Source from the content-addressed store, hash-verified

36
37# get content of a html
38def fetch_html(url: str):
39 try:
40 resp: requests.Response = requests.get(url, verify=False, timeout=10)
41 resp.encoding = 'utf-8'
42 if resp.status_code != 200:
43 print(f'[!] Got HTTP Status Code {resp.status_code}')
44 return None
45 return resp.text
46 except Exception as expt:
47 print(url)
48 print(expt)
49 return None
50
51
52# merge clash config files

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected