'iMacros - extracting text

Can you explain to me why my EXTRACT doesn't work? I am trying to count the number of users with private profiles in my group (because mostly these are bots). So I need to check whether the string "This profile is private" exists on the user's page. After the code runs, a blue frame appears around the DIV which means the element is pinned correctly. However, the extract result is NaN. I tried extracting both TXT and HTM.

 iimPlay("CODE:TAG POS=1 TYPE=DIV ATTR=TXT:This<SP>profile<SP>is<SP>private EXTRACT=TXT");
 var pageblock = parseInt (iimGetLastExtract());
  alert (pageblock);

An example page with a private profile: https://vk.com/id646170325

I tried extracting both TXT and HTM.



Solution 1:[1]

Yep normal..., no way you can convert the extracted This profile is private (is a String) to an Integer...!, ... which is what parseInt() is trying to do..., => Result = NaN...
=> The Behaviour/Result looks then "normal" to me...

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 chivracq