You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
1.0 KiB
27 lines
1.0 KiB
# -*- coding: utf-8 -*-
|
|
"""dump #base 内部结构与 u div 样式来源"""
|
|
import io, sys
|
|
from pathlib import Path
|
|
|
|
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding='utf-8')
|
|
P = Path(r'e:\code\crm-backend-matt\.scratch\a7-parity\pages\a7-3-1_线索规则')
|
|
h = (P / 'a7-3-1_线索规则.html').read_text(encoding='utf-8', errors='replace')
|
|
i = h.find('<div id="base"')
|
|
print('=== base div innerHTML head ===')
|
|
print(h[i:i+1200])
|
|
print()
|
|
print('=== first u div raw (in html) ===')
|
|
j = h.find('<div id="u3"')
|
|
print(h[j:j+400] if j >= 0 else 'u3 not found')
|
|
|
|
# styles.css 是否被 html 引用 + 本地是否存在
|
|
print()
|
|
print('=== css refs ===')
|
|
import re
|
|
for m in re.finditer(r'<link[^>]*href="([^"]+)"', h):
|
|
print(m.group(1))
|
|
for rel in ['data/styles.css', 'resources/css/axure_rp_page.css']:
|
|
print(rel, 'exists:', (P / rel).exists())
|
|
page_css = P / 'files' / 'a7-3-1_线索规则' / 'styles.css'
|
|
print('page styles.css exists:', page_css.exists(),
|
|
page_css.stat().st_size if page_css.exists() else 0)
|
|
|