()
| 83 | |
| 84 | |
| 85 | def 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 | |
| 103 | if __name__ == '__main__': |
no test coverage detected