Add HTML snippet debug to see actual structure
This commit is contained in:
parent
549f3cb31f
commit
99c2a6aa10
1 changed files with 8 additions and 0 deletions
|
|
@ -264,6 +264,14 @@
|
|||
</cfif>
|
||||
</cfloop>
|
||||
<cfset response["DEBUG_H4_TAGS"] = h4Texts>
|
||||
|
||||
<!--- Debug: show raw HTML snippet around first h3 tag --->
|
||||
<cfset h3Pos = findNoCase("<h3", combinedHtml)>
|
||||
<cfif h3Pos GT 0>
|
||||
<cfset snippetStart = max(1, h3Pos - 200)>
|
||||
<cfset snippetEnd = min(len(combinedHtml), h3Pos + 500)>
|
||||
<cfset response["DEBUG_HTML_SNIPPET"] = mid(combinedHtml, snippetStart, snippetEnd - snippetStart)>
|
||||
</cfif>
|
||||
<cfset arrayAppend(response.steps, "Found " & arrayLen(h3Texts) & " h3 and " & arrayLen(h4Texts) & " h4 tags")>
|
||||
|
||||
<!--- System prompt for URL analysis --->
|
||||
|
|
|
|||
Reference in a new issue