feat: auto-extract expected_domain from external script URLs
When HTML has no sgclaw-expected-domain meta tag, analyzer now scans for external script URLs (http:// or https://) and extracts the domain (host:port) as expected_domain. Example: <script src="http://25.215.213.128:18080/a_js/YPTAPI.js"></script> → expected_domain = "25.215.213.128:18080" This reduces manual editing required for third-party scenes. 🤖 Generated with [Qoder][https://qoder.com]
This commit is contained in:
11
tests/fixtures/generated_scene/external_script/index.html
vendored
Normal file
11
tests/fixtures/generated_scene/external_script/index.html
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<title>测试外部脚本提取</title>
|
||||
<script src="http://25.215.213.128:18080/a_js/YPTAPI.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="app">测试页面</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user