Update main.py
Browse files
main.py
CHANGED
@@ -168,13 +168,20 @@ def proxy(path):
|
|
168 |
|
169 |
current_span = None
|
170 |
for link in nav_links:
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
|
|
|
|
|
|
|
|
176 |
current_span = soup.new_tag('span')
|
177 |
breadcrumb_div.append(current_span)
|
|
|
|
|
|
|
178 |
|
179 |
# Replace old navigation with new breadcrumb
|
180 |
first_hr = soup.find('hr')
|
|
|
168 |
|
169 |
current_span = None
|
170 |
for link in nav_links:
|
171 |
+
# Skip links without text content or those in table cells
|
172 |
+
if not link.string or link.parent.name == 'td':
|
173 |
+
continue
|
174 |
+
|
175 |
+
# Skip navigation arrows
|
176 |
+
if '>' in link.string:
|
177 |
+
continue
|
178 |
+
|
179 |
+
if current_span is None:
|
180 |
current_span = soup.new_tag('span')
|
181 |
breadcrumb_div.append(current_span)
|
182 |
+
current_span.append(link)
|
183 |
+
current_span = soup.new_tag('span')
|
184 |
+
breadcrumb_div.append(current_span)
|
185 |
|
186 |
# Replace old navigation with new breadcrumb
|
187 |
first_hr = soup.find('hr')
|