From 661678369bcfcda99bff52fe5ca71b728868b48e Mon Sep 17 00:00:00 2001 From: Imre Kristoffer Eilertsen Date: Wed, 25 Oct 2023 05:52:46 +0200 Subject: [PATCH] =?UTF-8?q?This=20is=20the=20Big=20One=E2=84=A2=C2=A9?= =?UTF-8?q?=E2=84=A2=C2=AE.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If this mass upload works, I have become John Freeman, saver of humens (sic). --- .../XYZPrepareFilters.py | 108 +++++++++--------- 1 file changed, 54 insertions(+), 54 deletions(-) diff --git a/NorwegianExperimentalList alternate versions/XYZPrepareFilters.py b/NorwegianExperimentalList alternate versions/XYZPrepareFilters.py index de222d529..c5e082714 100644 --- a/NorwegianExperimentalList alternate versions/XYZPrepareFilters.py +++ b/NorwegianExperimentalList alternate versions/XYZPrepareFilters.py @@ -2261,28 +2261,28 @@ if __name__ == "__main__": umatrix_filter = prepare_umatrix(lines) xul_filter = prepare_xul(lines) - with open(OUTPUT, "w") as text_file: + with open(OUTPUT, "w", encoding="utf-8", newline='\n') as text_file: text_file.write(text) - with open(OUTPUT_AG, "w") as text_file: + with open(OUTPUT_AG, "w", encoding="utf-8", newline='\n') as text_file: text_file.write(ag_filter) - with open(OUTPUT_ABP, "w") as text_file: + with open(OUTPUT_ABP, "w", encoding="utf-8", newline='\n') as text_file: text_file.write(abp_filter) - with open(OUTPUT_TPL, "w") as text_file: + with open(OUTPUT_TPL, "w", encoding="utf-8", newline='\n') as text_file: text_file.write(tpl_filter) - with open(OUTPUT_PRIVOXY, "w") as text_file: + with open(OUTPUT_PRIVOXY, "w", encoding="utf-8", newline='\n') as text_file: text_file.write(privoxy_filter) - with open(OUTPUT_PRIVACY, "w") as text_file: + with open(OUTPUT_PRIVACY, "w", encoding="utf-8", newline='\n') as text_file: text_file.write(privacy_filter) - with open(OUTPUT_UMATRIX, "w") as text_file: + with open(OUTPUT_UMATRIX, "w", encoding="utf-8", newline='\n') as text_file: text_file.write(umatrix_filter) - with open(OUTPUT_XUL, "w") as text_file: + with open(OUTPUT_XUL, "w", encoding="utf-8", newline='\n') as text_file: text_file.write(xul_filter) print('The adblocker-based list versions have been generated.') @@ -3108,10 +3108,10 @@ if __name__ == "__main__": abp_filter = prepare_abp(lines) - with open(OUTPUT, "w") as text_file: + with open(OUTPUT, "w", encoding="utf-8", newline='\n') as text_file: text_file.write(text) - with open(OUTPUT_ABP, "w") as text_file: + with open(OUTPUT_ABP, "w", encoding="utf-8", newline='\n') as text_file: text_file.write(abp_filter) print('The Eyeo list version has been generated.') @@ -4337,43 +4337,43 @@ if __name__ == "__main__": hostsipv6_filter = prepare_hostsipv6(lines) domainsallowlist_filter = prepare_domainsallowlist(lines) - with open(OUTPUT, "w") as text_file: + with open(OUTPUT, "w", encoding="utf-8", newline='\n') as text_file: text_file.write(text) - with open(OUTPUT_HOSTS, "w") as text_file: + with open(OUTPUT_HOSTS, "w", encoding="utf-8", newline='\n') as text_file: text_file.write(hosts_filter) - with open(OUTPUT_LS, "w") as text_file: + with open(OUTPUT_LS, "w", encoding="utf-8", newline='\n') as text_file: text_file.write(ls_filter) - with open(OUTPUT_DNSMASQ, "w") as text_file: + with open(OUTPUT_DNSMASQ, "w", encoding="utf-8", newline='\n') as text_file: text_file.write(dnsmasq_filter) - with open(OUTPUT_HOSTSDENY, "w") as text_file: + with open(OUTPUT_HOSTSDENY, "w", encoding="utf-8", newline='\n') as text_file: text_file.write(hostsdeny_filter) - with open(OUTPUT_PIHOLE, "w") as text_file: + with open(OUTPUT_PIHOLE, "w", encoding="utf-8", newline='\n') as text_file: text_file.write(pihole_filter) - with open(OUTPUT_AGH, "w") as text_file: + with open(OUTPUT_AGH, "w", encoding="utf-8", newline='\n') as text_file: text_file.write(agh_filter) - with open(OUTPUT_SHADOWSOCKS, "w") as text_file: + with open(OUTPUT_SHADOWSOCKS, "w", encoding="utf-8", newline='\n') as text_file: text_file.write(shadowsocks_filter) - with open(OUTPUT_RPZ, "w") as text_file: + with open(OUTPUT_RPZ, "w", encoding="utf-8", newline='\n') as text_file: text_file.write(rpz_filter) - with open(OUTPUT_UNBOUND, "w") as text_file: + with open(OUTPUT_UNBOUND, "w", encoding="utf-8", newline='\n') as text_file: text_file.write(unbound_filter) - with open(OUTPUT_MINERBLOCK, "w") as text_file: + with open(OUTPUT_MINERBLOCK, "w", encoding="utf-8", newline='\n') as text_file: text_file.write(minerblock_filter) - with open(OUTPUT_HOSTSIPV6, "w") as text_file: + with open(OUTPUT_HOSTSIPV6, "w", encoding="utf-8", newline='\n') as text_file: text_file.write(hostsipv6_filter) - with open(OUTPUT_DOMAINSALLOWLIST, "w") as text_file: + with open(OUTPUT_DOMAINSALLOWLIST, "w", encoding="utf-8", newline='\n') as text_file: text_file.write(domainsallowlist_filter) print('The domains-based list versions have been generated.') @@ -5366,7 +5366,7 @@ def prepare_tpl(lines) -> str: ) line = re.sub( - r".* (cisco|cloudflare)\.com$", + r".* (cisco|cloudflare|adobe|atlassian)\.com$", r"", line ) @@ -5514,7 +5514,7 @@ def prepare_privoxy(lines) -> str: ) line = re.sub( - r"^\.(amazonaws|cisco|cloudflare).*", + r"^\.(amazonaws|cisco|cloudflare|adobe|atlassian).*", r"", line ) @@ -6357,28 +6357,28 @@ if __name__ == "__main__": domains_filter = prepare_domains(lines) agh_filter = prepare_agh(lines) - with open(OUTPUT, "w") as text_file: + with open(OUTPUT, "w", encoding="utf-8", newline='\n') as text_file: text_file.write(text) - with open(OUTPUT_AG, "w") as text_file: + with open(OUTPUT_AG, "w", encoding="utf-8", newline='\n') as text_file: text_file.write(ag_filter) - with open(OUTPUT_ABP, "w") as text_file: + with open(OUTPUT_ABP, "w", encoding="utf-8", newline='\n') as text_file: text_file.write(abp_filter) - with open(OUTPUT_TPL, "w") as text_file: + with open(OUTPUT_TPL, "w", encoding="utf-8", newline='\n') as text_file: text_file.write(tpl_filter) - with open(OUTPUT_PRIVOXY, "w") as text_file: + with open(OUTPUT_PRIVOXY, "w", encoding="utf-8", newline='\n') as text_file: text_file.write(privoxy_filter) - with open(OUTPUT_HOSTS, "w") as text_file: + with open(OUTPUT_HOSTS, "w", encoding="utf-8", newline='\n') as text_file: text_file.write(hosts_filter) - with open(OUTPUT_DOMAINS, "w") as text_file: + with open(OUTPUT_DOMAINS, "w", encoding="utf-8", newline='\n') as text_file: text_file.write(domains_filter) - with open(OUTPUT_AGH, "w") as text_file: + with open(OUTPUT_AGH, "w", encoding="utf-8", newline='\n') as text_file: text_file.write(agh_filter) print('The script has finished its work') @@ -6466,10 +6466,10 @@ if __name__ == "__main__": domains_filter = prepare_domains(lines) - with open(OUTPUT, "w") as text_file: + with open(OUTPUT, "w", encoding="utf-8", newline='\n') as text_file: text_file.write(text) - with open(OUTPUT_DOMAINS, "w") as text_file: + with open(OUTPUT_DOMAINS, "w", encoding="utf-8", newline='\n') as text_file: text_file.write(domains_filter) print('The list versions have been generated.') @@ -6553,10 +6553,10 @@ if __name__ == "__main__": domains_filter = prepare_domains(lines) - with open(OUTPUT, "w") as text_file: + with open(OUTPUT, "w", encoding="utf-8", newline='\n') as text_file: text_file.write(text) - with open(OUTPUT_DOMAINS, "w") as text_file: + with open(OUTPUT_DOMAINS, "w", encoding="utf-8", newline='\n') as text_file: text_file.write(domains_filter) print('The list versions have been generated.') @@ -6765,13 +6765,13 @@ if __name__ == "__main__": domains_filter = prepare_domains(lines) agh_filter = prepare_agh(lines) - with open(OUTPUT, "w") as text_file: + with open(OUTPUT, "w", encoding="utf-8", newline='\n') as text_file: text_file.write(text) - with open(OUTPUT_DOMAINS, "w") as text_file: + with open(OUTPUT_DOMAINS, "w", encoding="utf-8", newline='\n') as text_file: text_file.write(domains_filter) - with open(OUTPUT_AGH, "w") as text_file: + with open(OUTPUT_AGH, "w", encoding="utf-8", newline='\n') as text_file: text_file.write(agh_filter) print('The list versions have been generated.') @@ -6855,10 +6855,10 @@ if __name__ == "__main__": domains_filter = prepare_domains(lines) - with open(OUTPUT, "w") as text_file: + with open(OUTPUT, "w", encoding="utf-8", newline='\n') as text_file: text_file.write(text) - with open(OUTPUT_DOMAINS, "w") as text_file: + with open(OUTPUT_DOMAINS, "w", encoding="utf-8", newline='\n') as text_file: text_file.write(domains_filter) print('The list versions have been generated.') @@ -6942,10 +6942,10 @@ if __name__ == "__main__": domains_filter = prepare_domains(lines) - with open(OUTPUT, "w") as text_file: + with open(OUTPUT, "w", encoding="utf-8", newline='\n') as text_file: text_file.write(text) - with open(OUTPUT_DOMAINS, "w") as text_file: + with open(OUTPUT_DOMAINS, "w", encoding="utf-8", newline='\n') as text_file: text_file.write(domains_filter) print('The list versions have been generated.') @@ -7029,10 +7029,10 @@ if __name__ == "__main__": domains_filter = prepare_domains(lines) - with open(OUTPUT, "w") as text_file: + with open(OUTPUT, "w", encoding="utf-8", newline='\n') as text_file: text_file.write(text) - with open(OUTPUT_DOMAINS, "w") as text_file: + with open(OUTPUT_DOMAINS, "w", encoding="utf-8", newline='\n') as text_file: text_file.write(domains_filter) print('The list versions have been generated.') @@ -7159,10 +7159,10 @@ if __name__ == "__main__": domains_filter = prepare_domains(lines) - with open(OUTPUT, "w") as text_file: + with open(OUTPUT, "w", encoding="utf-8", newline='\n') as text_file: text_file.write(text) - with open(OUTPUT_DOMAINS, "w") as text_file: + with open(OUTPUT_DOMAINS, "w", encoding="utf-8", newline='\n') as text_file: text_file.write(domains_filter) print('The combined IP list has been generated.') @@ -7295,10 +7295,10 @@ if __name__ == "__main__": domains_filter = prepare_domains(lines) - with open(OUTPUT, "w") as text_file: + with open(OUTPUT, "w", encoding="utf-8", newline='\n') as text_file: text_file.write(text) - with open(OUTPUT_DOMAINS, "w") as text_file: + with open(OUTPUT_DOMAINS, "w", encoding="utf-8", newline='\n') as text_file: text_file.write(domains_filter) print('The Nitter list version has been generated.') @@ -7377,10 +7377,10 @@ if __name__ == "__main__": domains_filter = prepare_domains(lines) - with open(OUTPUT, "w") as text_file: + with open(OUTPUT, "w", encoding="utf-8", newline='\n') as text_file: text_file.write(text) - with open(OUTPUT_DOMAINS, "w") as text_file: + with open(OUTPUT_DOMAINS, "w", encoding="utf-8", newline='\n') as text_file: text_file.write(domains_filter) print('The Nitter list version has been generated.') @@ -7471,10 +7471,10 @@ if __name__ == "__main__": domains_filter = prepare_domains(lines) - with open(OUTPUT, "w") as text_file: + with open(OUTPUT, "w", encoding="utf-8", newline='\n') as text_file: text_file.write(text) - with open(OUTPUT_DOMAINS, "w") as text_file: + with open(OUTPUT_DOMAINS, "w", encoding="utf-8", newline='\n') as text_file: text_file.write(domains_filter) print('The Fanboy Notifications uBO version has been generated.') \ No newline at end of file