Commit 06d12f91 authored by nextime's avatar nextime

Fix Python SyntaxWarning for invalid escape sequence

- Fixed invalid escape sequence '\s' on line 523 in JavaScript regex pattern
- Changed from single backslash to double backslash for proper escaping
- Ensures Python interpreter correctly handles the JavaScript string literal
- Eliminates SyntaxWarning while maintaining JavaScript regex functionality
parent 51c28026
...@@ -520,7 +520,7 @@ async def detect_json_response_with_id(page, container_selector, request_id, pro ...@@ -520,7 +520,7 @@ async def detect_json_response_with_id(page, container_selector, request_id, pro
} catch (e) { } catch (e) {
// Try to extract response value from malformed JSON - simplified // Try to extract response value from malformed JSON - simplified
try { try {
const responsePattern = /"response"\s*:\s*"([^"]*)"/; const responsePattern = /"response"\\s*:\\s*"([^"]*)"/;
const responseMatch = match.match(responsePattern); const responseMatch = match.match(responsePattern);
if (responseMatch && match.includes(requestId)) { if (responseMatch && match.includes(requestId)) {
const responseValue = responseMatch[1]; const responseValue = responseMatch[1];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment