Using net:http parser, I'm performing two queries on Google per keyword and saving both results to the same file like this: Code: [% IF p1.info.success == 1; IF query.lvl ==0; p1.data _ "\n<!-- PAGE_SEPARATE -->\n"; ELSE; p1.data _ "\n"; END; END; USE Math; dir = Math.int(query.num / 2000); tools.query.add(query.first _ ';' _ dir, 1) %] I'm having a problem where if either query fails the result fail contains only a partial result. Is there a way to only create a result file if both queries are successful ensuring the result file contains both results?
Hello. To solve your problem you can use two parsers and if the requests of both parsers are successful then write the result to a file. To check the success of a query, you can use the variable $code. For example, Code: [% IF p1.code == '200' && p2.code == '200'; p1.data; END; %] Or you can check it again Code: IF p1.info.success && p2.info.success