Assign Value of "1" or "0" To Output Variable?

scrapefun

A-Parser Enterprise License
A-Parser Enterprise
When scraping Google, I am creating some regex to check to see if certain div elements appear on the search results page.

I don't actually want to extract the div element but just want to know if it exists or not on the page.

How I can I assign a value of "1" if it exists or "0" if it doesn't to the result file like the $misspell variable does?
 
Just test variable compared to 'none':
7ctsm.png
 
Thanks.

I'm having trouble putting everything together. Here is what I have:

parsersettings.png

I'm sure I'm missing something very simple and more than likely bungled the regex :-)

Basically, I want to check the search result page for the exact text I put in parenthesis in the regex field (I've tried it without the parenthesis too) and if it exists display a 1 and if not display 0.

Of the keywords in the queries box only the results for "how to kill fruit flies" should display a "1" and the others should display a "0" but any keyword I use displays a 1.
 

Attachments

  • parsersettings.png
    parsersettings.png
    108.8 KB · Views: 1
Looks like the data I'm trying to find is requires javascript to be rendered and I see in debug mode that the javascript is not rendered. There is no way to search the full source code of s SERP page?
 
For work with raw data in this parser it is necessary through to switch on the option Raw data results
9LVJW.png

Also instead of answer = 'none' need to be written check.0.answer == '' to Result format, as there is an address not to a variable, and to value in the array
Wx4Sg.png

Looks like the data I'm trying to find is requires javascript to be rendered and I see in debug mode that the javascript is not rendered. There is no way to search the full source code of s SERP page?
No, the way to search the full source code of a SERP page doesn't exist.
 
Back
Top