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

Function main

combine/combine.py:85–100  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

83
84
85def main():
86 print(f'[+] Got {len(clash_url_list)} Clash URLs, {len(v2ray_url_list)} V2Ray URLs')
87
88 # store html associated with each link
89 clash_configs: List[str] = list(map(lambda u: fetch_html(u), clash_url_list))
90 v2ray_configs: List[str] = list(map(lambda u: fetch_html(u), v2ray_url_list))
91
92 # merge clash / v2ray configs
93 clash_merged: str = merge_clash(clash_configs)
94 v2ray_merged: str = merge_v2ray(v2ray_configs)
95
96 # write output files
97 with open(clash_output_file, 'w') as f:
98 f.write(clash_merged)
99 with open(v2ray_output_file, 'w') as f:
100 f.write(v2ray_merged)
101
102
103if __name__ == '__main__':

Callers 1

combine.pyFile · 0.85

Calls 3

fetch_htmlFunction · 0.85
merge_clashFunction · 0.85
merge_v2rayFunction · 0.85

Tested by

no test coverage detected