feat: implement swiper slider, tabbed livestream, and table extension plugins with schema updates for settings content

This commit is contained in:
2026-07-25 18:26:29 +07:00
parent 0eb7bd5863
commit 54e420499f
374 changed files with 16434 additions and 495 deletions
+21
View File
@@ -0,0 +1,21 @@
import re
import json
with open('/home/x79/sisvietnamvn_01/sisvietnamvn_Trang chính thức hiện tại/Đào tạo tại UMC.html', 'r', encoding='utf-8') as f:
html = f.read()
# Try to extract the main content. It's usually inside <div id="content"> or <main>
# Looking at typical Tailwind pages, let's extract everything inside <body> </body>
body_match = re.search(r'<body[^>]*>(.*)</body>', html, re.IGNORECASE | re.DOTALL)
if body_match:
content = body_match.group(1)
else:
content = html
# We know there are 4 Swiper instances. Let's find them.
# A swiper usually has `<div class="swiper swiper-initialized ..."> ... </div>`
# It's a bit tricky to parse nested divs with regex.
# Let's extract the slider images using regex on `swiper-slide`
slides = re.findall(r'<div class="swiper-slide[^>]*>.*?<img[^>]*src="([^"]+)"[^>]*>.*?</div>', html, re.IGNORECASE | re.DOTALL)
print(f"Found {len(slides)} slides with images.")