Unify HTML URL classification and fix content sniffing
What changed
- Extracted duplicated HTML-detection heuristics into a single
_is_html_url()static method, fixing bare-host URLs (e.g.https://example.com) being misclassified as non-HTML (thanks @pacnpal for reporting in #6) - Content sniffing now strips leading whitespace/BOM before checking for
<!DOCTYPEor<html>signatures, handling Wayback-injected scripts that appear before the real markup - Added case-insensitive
<!doctypedetection