I’m parsing multiple keyword search on a newspaper website.
How can I do it so that if my first keyword result is 0 to skip to a certain block?
BLOCK:HttpRequest
url = "https://website.com/query=keyword"
TYPE:STANDARD
$""
"application/x-www-form-urlencoded"
ENDBLOCK
BLOCK:Keycheck
KEYCHAIN CUSTOM OR
STRINGKEY @data.SOURCE Contains "null"
KEYCHAIN SUCCESS OR
STRINGKEY @data.SOURCE Contains "result"
ENDBLOCK
BLOCK:Parse
input = @data.SOURCE
leftDelim = "result"
jToken = "resultid"
MODE:Json
=> VAR @results
ENDBLOCK
BLOCK:HttpRequest
url = $"https://website.com/download=<results>"
TYPE:STANDARD
$""
"application/x-www-form-urlencoded"
ENDBLOCK
BLOCK:HttpRequest
url = "https://website.com/query=keyword2"
TYPE:STANDARD
$""
"application/x-www-form-urlencoded"
ENDBLOCK
BLOCK:Keycheck
KEYCHAIN CUSTOM OR
STRINGKEY @data.SOURCE Contains "null"
KEYCHAIN SUCCESS OR
STRINGKEY @data.SOURCE Contains "result"
ENDBLOCK
BLOCK:Parse
input = @data.SOURCE
leftDelim = "result"
jToken = "result"
MODE:Json
=> VAR @results2
ENDBLOCK
BLOCK:HttpRequest
url = $"https://website.com/download=<results2>"
TYPE:STANDARD
$""
"application/x-www-form-urlencoded"
ENDBLOCK
I want to go to the second search if the result of the first request is CUSTOM and skipping the other blocks.