re-initialize and make some changes. repository got to around 2 gigabytes and needed to be more efficient

This commit is contained in:
soap
2023-09-29 12:56:26 -05:00
commit 234e4592fa
1441 changed files with 476627 additions and 0 deletions
+19
View File
@@ -0,0 +1,19 @@
import os
import re
def remove_age_gate(file_path):
with open(file_path, 'r') as file:
content = file.read()
new_content = re.sub(
r'<script id="age_check_preload" src="https:\/\/diyhrt\.wiki\/age-check\.js">.*?<\/script>', '', content, flags=re.DOTALL)
with open(file_path, 'w') as file:
file.write(new_content)
directory_path = 'diyhrt.wiki'
for filename in os.listdir(directory_path):
file_path = os.path.join(directory_path, filename)
if os.path.isfile(file_path):
remove_age_gate(file_path)