Update main.py
Browse files
main.py
CHANGED
@@ -159,6 +159,15 @@ def proxy(path):
|
|
159 |
td { padding: 8px; }
|
160 |
}
|
161 |
'''
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
162 |
soup.head.append(style_tag)
|
163 |
|
164 |
# Convert navigation links to breadcrumb
|
|
|
159 |
td { padding: 8px; }
|
160 |
}
|
161 |
'''
|
162 |
+
# Check if head exists, if not create it
|
163 |
+
if not soup.head:
|
164 |
+
head_tag = soup.new_tag('head')
|
165 |
+
if soup.html:
|
166 |
+
soup.html.insert(0, head_tag)
|
167 |
+
else:
|
168 |
+
html_tag = soup.new_tag('html')
|
169 |
+
html_tag.append(head_tag)
|
170 |
+
soup.append(html_tag)
|
171 |
soup.head.append(style_tag)
|
172 |
|
173 |
# Convert navigation links to breadcrumb
|