Starchik1 commited on
Commit
3a4974c
·
verified ·
1 Parent(s): 6d8d6cc

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +8 -0
main.py CHANGED
@@ -174,6 +174,14 @@ def proxy(path):
174
  html_tag.append(body_tag)
175
  soup.append(html_tag)
176
 
 
 
 
 
 
 
 
 
177
  # Add JavaScript for modal functionality
178
  script_tag = soup.new_tag('script')
179
  script_tag.string = '''
 
174
  html_tag.append(body_tag)
175
  soup.append(html_tag)
176
 
177
+ # Remove footer links and separator
178
+ for element in soup.find_all(['a', 'text'], string=re.compile(r'^\s*\|\s*$')):
179
+ element.decompose()
180
+
181
+ for element in soup.find_all('a', href=re.compile(r'^/etka/')):
182
+ if not element.string or element.string.strip() == '':
183
+ element.decompose()
184
+
185
  # Add JavaScript for modal functionality
186
  script_tag = soup.new_tag('script')
187
  script_tag.string = '''