Extracting data of JSON

Discussions and Tech Support related to website data extraction, screen scraping and data mining using iMacros.
Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the Google search box (at the top of each forum page) to see if a similar problem or question has already been addressed. This will search the entire contents of the forums as well as the iMacros Wiki.
3. We can respond much faster to your posts if you include the following information:

CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST

Answering your own posts (e.g. attempting to "bump" your topic) drops your topic from the list of unanswered threads, so it may actually receive less views.
kevnad
Posts: 25
Joined: Wed Mar 02, 2011 3:22 pm

Re: Extracting data of JSON

Post by kevnad » Thu Sep 20, 2018 11:53 am

yes everything good for now

some tweaking still to do, but I'll get it.

Yes I undertand the EVAL statement and will be able to use that in the future for other situation.

thanks a lot for your help!
chivracq
Posts: 7722
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Extracting data of JSON

Post by chivracq » Thu Sep 20, 2018 1:53 pm

kevnad wrote:yes everything good for now

some tweaking still to do, but I'll get it.

Yes I undertand the EVAL statement and will be able to use that in the future for other situation.

thanks a lot for your help!
OK, perfect, good to hear... :D
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
kevnad
Posts: 25
Joined: Wed Mar 02, 2011 3:22 pm

Re: Extracting data of JSON

Post by kevnad » Mon Oct 29, 2018 5:56 pm

There has been a change in the web page and now the EVAL statement does not work anymore.

And whatever I do, I always have an error.

I have uploaded extractv2.txt. This is the new extract. Still need the same extraction.

If I do the same EVAL from iMacro, I have this error :
Error -1250: JScript statement in EVAL contains the following error: Expected ';'. Line 12: SET URL_nav EVAL("var s='{{!EXTRACT}}', d1='{{Descr_1}}', d2='{{Descr_2}}', x,y,z; x=s.split(d1); x;")

If I only remove the section "sondages" in the JSON, it works.

This is the EVAL statement :

SET Descr_1 "yyyyyy-EOP"
SET Descr_2 "C.D. DU VIEUX-LONGUEUIL"
SET URL_nav EVAL("var s='{{!EXTRACT}}', d1='{{Descr_1}}', d2='{{Descr_2}}', x,y,z; x=s.split(d1); x;")

it is a subset of the longer EVAL query that have the same issue :
SET URL_nav EVAL("var s='{{!EXTRACT}}', d1='{{Descr_1}}', d2='{{Descr_2}}', x,y,z; x=s.split(d1)[1].split(d2); y=x[1].split('http'); z='http'+y[1].split('\"')[0]; z;")

Works whenever I remove the sondages section.

Hope you can help!

Thanks
chivracq
Posts: 7722
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Extracting data of JSON

Post by chivracq » Mon Oct 29, 2018 6:31 pm

kevnad wrote:There has been a change in the web page and now the EVAL statement does not work anymore.

And whatever I do, I always have an error.

I have uploaded extractv2.txt. This is the new extract. Still need the same extraction.

If I do the same EVAL from iMacro, I have this error :

Code: Select all

Error -1250: JScript statement in EVAL contains the following error: Expected ';'. Line 12: SET URL_nav EVAL("var s='{{!EXTRACT}}', d1='{{Descr_1}}', d2='{{Descr_2}}', x,y,z; x=s.split(d1); x;")
If I only remove the section "sondages" in the JSON, it works.

This is the EVAL statement :

Code: Select all

SET Descr_1 "yyyyyy-EOP"
SET Descr_2 "C.D. DU VIEUX-LONGUEUIL"
SET URL_nav EVAL("var s='{{!EXTRACT}}', d1='{{Descr_1}}', d2='{{Descr_2}}', x,y,z; x=s.split(d1); x;") 
it is a subset of the longer EVAL query that have the same issue :

Code: Select all

SET URL_nav EVAL("var s='{{!EXTRACT}}', d1='{{Descr_1}}', d2='{{Descr_2}}', x,y,z; x=s.split(d1)[1].split(d2); y=x[1].split('http'); z='http'+y[1].split('\"')[0]; z;")
Works whenever I remove the sondages section.

Hope you can help!

Thanks
No 'extractv2.txt' Attachment uploaded to your Post... (Needs to be zipped, '.txt' Files are not accepted by the Forum Software...)

I guess your "sondages" Section probably contains as well some Strings that I used in the 2 'Descr_1' + 'Descr_2' Vars for the 'split()' Statements in the 'EVAL()' which probably shift the "[1]" I use in the 'EVAL()' to "[2]" or "[3]"...

Just like you need to return some "x[1]" or "x[n]" instead of only "x" in:

Code: Select all

SET URL_nav EVAL("var s='{{!EXTRACT}}', d1='{{Descr_1}}', d2='{{Descr_2}}', x,y,z; x=s.split(d1); x;")
... => You don't want the whole Array. There is no use to split a String (your '!EXTRACT') on a String ('Descr_1') and to return the whole Array... (which iMacros treats like a String outside 'EVAL()' anyway...).

I was already using the 2 ('Descr_n') Vars as a "Double Safe" Mechanism to make sure your URL would only be found after 'Descr_1', as 'Descr_2' was already/also present in some other Sections before the one you were interested in..., (and I declared them outside the 'EVAL()' for them to be easily modified if anything changed), => you might now need to adapt 'Descr_1' to some String that will occur for the 1st time, ... or to add another extra Level of 'split()' with a 3rd Var to make sure your URL you want to isolate still appears uniquely and for the 1st time in the '!EXTRACT'. :wink:
Last edited by chivracq on Mon Oct 29, 2018 6:59 pm, edited 1 time in total.
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
chivracq
Posts: 7722
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Extracting data of JSON

Post by chivracq » Mon Oct 29, 2018 6:49 pm

Oh but hum, concerning the RuntimeError you are getting about a missing ';', I was using a "somewhat simplified" Syntax that allows to use the "var" Declaration only once if all Vars are separated by a Comma (','), which works on FF (where "var" is not even needed), but iMB is a little bit "stricter" with Var Declarations in 'EVAL()' and might need the "var" Keyword for all Vars..., although it looks like it was working before, so I'm not sure that will be the "real" Culprit... :?

Code: Select all

SET URL_nav EVAL("var s='{{!EXTRACT}}'; var d1='{{Descr_1}}'; var d2='{{Descr_2}}'; var x=s.split(d1); x[1];")
PROMPT _{{URL_nav}}_
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
kevnad
Posts: 25
Joined: Wed Mar 02, 2011 3:22 pm

Re: Extracting data of JSON

Post by kevnad » Mon Oct 29, 2018 7:22 pm

Here's the extractv2 in zip.

I'll check your answer for all you wrote ;)

but basically, the EVAL was working flawlessly but the change on the page.
Attachments
extractv2.zip
(2.06 KiB) Downloaded 13 times
kevnad
Posts: 25
Joined: Wed Mar 02, 2011 3:22 pm

Re: Extracting data of JSON

Post by kevnad » Mon Oct 29, 2018 7:31 pm

The Descr_1 is only one time in the extract

So I tried with only this one with this EVAL :

SET URL_nav EVAL("var s='{{!EXTRACT}}', d1='{{Descr_1}}', d2='{{Descr_2}}', x,y,z; x=s.split(d1); x;")

And if I don't have the new section, it works, but if it's there, it does not.

It is something with the sondage section... and can't find it.

I remove it, and put something else in this section (a copy of another section) and make it bigger and it's working.
kevnad
Posts: 25
Joined: Wed Mar 02, 2011 3:22 pm

Re: Extracting data of JSON

Post by kevnad » Mon Oct 29, 2018 7:40 pm

I found that if I remove this line from the "sondage" section :

"texte":"La Caisse C.D. DU VIEUX-LONGUEUIL aimerait avoir votre avis sur l'utilisation de vos données pour vos offres Desjardins.",

everything works good!

Even if I only remove the weird character (that is the é character), it does not work, I have to remove the line completly for it to work...

any idea why?
chivracq
Posts: 7722
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Extracting data of JSON

Post by chivracq » Mon Oct 29, 2018 8:26 pm

kevnad wrote:Here's the extractv2 in zip.

I'll check your answer for all you wrote ;)

but basically, the EVAL was working flawlessly but the change on the page.
kevnad wrote:The Descr_1 is only one time in the extract

So I tried with only this one with this EVAL :

SET URL_nav EVAL("var s='{{!EXTRACT}}', d1='{{Descr_1}}', d2='{{Descr_2}}', x,y,z; x=s.split(d1); x;")

And if I don't have the new section, it works, but if it's there, it does not.

It is something with the sondage section... and can't find it.

I remove it, and put something else in this section (a copy of another section) and make it bigger and it's working.
kevnad wrote:I found that if I remove this line from the "sondage" section :

"texte":"La Caisse C.D. DU VIEUX-LONGUEUIL aimerait avoir votre avis sur l'utilisation de vos données pour vos offres Desjardins.",

everything works good!

Even if I only remove the weird character (that is the é character), it does not work, I have to remove the line completly for it to work...

any idea why?
OK, I was able to have a look at your "new" 'JSON' File...

In my Test, there is no ""xxxxxx-EOP" in the File anymore, so the 'split()' on that 'Descr_1' String does a bit nothing and returns the complete original '!EXTRACT' in 'x[0]', but 'x[1]' doesn't exist anymore.

There are 2 Strings that are present: "yyyyyy-EOP" + "zzzzzzzz-EOP", => you need to adapt 'Descr_1' to the Value/String that you want exactly...

Or it is possible to shorten 'Descr_1' to only "-EOP" which is contained in both Strings, then 'x[1]' will return the correspond 'URL_nav' to "yyyyyy-EOP" and 'x[2]' will return the corresponding 'URL_nav' to "zzzzzzzz-EOP"...:

With 'x[1]':

Code: Select all

VERSION BUILD=8820413 RECORDER=FX
SET !EXTRACT_TEST_POPUP NO
TAB T=1
'URL GOTO=file:///D:/TEMP/iMacros/Temp/_Forum%20Cases/kevnad/extract.json
'URL GOTO=file:///D:/TEMP/iMacros/Temp/_Forum%20Cases/kevnad/extractv2.json

'SET Descr_1 "xxxxxx-EOP"
SET Descr_1 "-EOP"
SET Descr_2 "C.D. DU VIEUX-LONGUEUIL"

TAG POS=1 TYPE=PRE ATTR=TXT:{<SP>"messages":[<SP>],<SP>"detention":{<SP>"messages":[* EXTRACT=TXT

SET URL_nav EVAL("var s='{{!EXTRACT}}', d1='{{Descr_1}}', d2='{{Descr_2}}', x,y,z; x=s.split(d1)[1].split(d2); y=x[1].split('http'); z='http'+y[1].split('\"')[0]; z;")
PROMPT URL_nav:<BR>_{{URL_nav}}_
=> Will extract:

Code: Select all

URL_nav:
_https://xxxxxx.xxxx.com/sommaire-perso/sommaire-aiguilleur/EOP/COP_PFIC_095203bd6485af3e534a7f011c90fe4b05bc39103fc78793e8549256a7c0b351/detail_
With 'x[2]':

Code: Select all

VERSION BUILD=8820413 RECORDER=FX
SET !EXTRACT_TEST_POPUP NO
TAB T=1
'URL GOTO=file:///D:/TEMP/iMacros/Temp/_Forum%20Cases/kevnad/extract.json
'URL GOTO=file:///D:/TEMP/iMacros/Temp/_Forum%20Cases/kevnad/extractv2.json

'SET Descr_1 "xxxxxx-EOP"
SET Descr_1 "-EOP"
SET Descr_2 "C.D. DU VIEUX-LONGUEUIL"

TAG POS=1 TYPE=PRE ATTR=TXT:{<SP>"messages":[<SP>],<SP>"detention":{<SP>"messages":[* EXTRACT=TXT

SET URL_nav EVAL("var s='{{!EXTRACT}}', d1='{{Descr_1}}', d2='{{Descr_2}}', x,y,z; x=s.split(d1)[2].split(d2); y=x[1].split('http'); z='http'+y[1].split('\"')[0]; z;")
PROMPT URL_nav:<BR>_{{URL_nav}}_
=> Will extract:

Code: Select all

URL_nav:
_https://xxxxxx.xxxx.com/sommaire-perso/sommaire-aiguilleur/EOP/COP_PFIC_e404b4cb5b77cdf6eb82bd40b02b644b5a95e8e0e4b341af08d5a985732c8fde/detail_
I'm not sure anymore which one of the 2 you need...

(Tested on iMacros for FF v8.8.2, Pale Moon v26.3.3 (=FF47), Win10_x64.)
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
kevnad
Posts: 25
Joined: Wed Mar 02, 2011 3:22 pm

Re: Extracting data of JSON

Post by kevnad » Tue Oct 30, 2018 12:24 pm

My mistake about the Descr1 and 2 not fitting, I had change some stuff in the json that were more confidential.

So, with the JSON file I have uploaded, here's the line that is needed :

SET Descr_1 "yyyyyy-EOP"
SET Descr_2 "C.D. DU VIEUX-LONGUEUIL"
SET URL_nav EVAL("var s='{{!EXTRACT}}', d1='{{Descr_1}}', d2='{{Descr_2}}', x,y,z; x=s.split(d1)[1].split(d2); y=x[1].split('http'); z='http'+y[1].split('\"')[0]; z;")

with iMacro Browser, I always get this error :

Error -1250: JScript statement in EVAL contains the following error: Expected ';'. Line 11: SET URL_nav EVAL("var s='{{!EXTRACT}}', d1='{{Descr_1}}', d2='{{Descr_2}}', x,y,z; x=s.split(d1)[1].split(d2); y=x[1].split('http'); z='http'+y[1].split('\"')[0]; z;")

If I remove this line in the JSON (line 377) :
"texte":"La Caisse C.D. DU VIEUX-LONGUEUIL aimerait avoir votre avis sur l'utilisation de vos données pour vos offres Desjardins.",
then it works fine.

Are you saying that on your side (which I think you are using FF) it is working?

thanks for your help!
kevnad
Posts: 25
Joined: Wed Mar 02, 2011 3:22 pm

Re: Extracting data of JSON

Post by kevnad » Tue Oct 30, 2018 5:03 pm

I found that the problem in the line is with the ' character :

"texte":"La Caisse C.D. DU VIEUX-LONGUEUIL aimerait avoir votre avis sur l'utilisation de vos données pour vos offres Desjardins.",

l'utilisation

I guess this make the rest of the line to be a comment, so that might be the reason why it complained about a missing ;
chivracq
Posts: 7722
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Extracting data of JSON

Post by chivracq » Tue Oct 30, 2018 6:59 pm

kevnad wrote:My mistake about the Descr1 and 2 not fitting, I had change some stuff in the json that were more confidential.

So, with the JSON file I have uploaded, here's the line that is needed :

Code: Select all

SET Descr_1 "yyyyyy-EOP"
SET Descr_2 "C.D. DU VIEUX-LONGUEUIL"
SET URL_nav EVAL("var s='{{!EXTRACT}}', d1='{{Descr_1}}', d2='{{Descr_2}}', x,y,z; x=s.split(d1)[1].split(d2); y=x[1].split('http'); z='http'+y[1].split('\"')[0]; z;")
with iMacro Browser, I always get this error :

Code: Select all

Error -1250: JScript statement in EVAL contains the following error: Expected ';'. Line 11: SET URL_nav EVAL("var s='{{!EXTRACT}}', d1='{{Descr_1}}', d2='{{Descr_2}}', x,y,z; x=s.split(d1)[1].split(d2); y=x[1].split('http'); z='http'+y[1].split('\"')[0]; z;")
If I remove this line in the JSON (line 377) :
"texte":"La Caisse C.D. DU VIEUX-LONGUEUIL aimerait avoir votre avis sur l'utilisation de vos données pour vos offres Desjardins.",
then it works fine.

Are you saying that on your side (which I think you are using FF) it is working?

thanks for your help!
kevnad wrote:I found that the problem in the line is with the ' character :

"texte":"La Caisse C.D. DU VIEUX-LONGUEUIL aimerait avoir votre avis sur l'utilisation de vos données pour vos offres Desjardins.",

l'utilisation

I guess this make the rest of the line to be a comment, so that might be the reason why it complained about a missing ;
Yep, no Pb for me using v8.8.2 for FF...

So OK, if the _'_ Char is causing the Pb, which I still find a bit "strange" as this "l'utilisation" is after the (last) "C.D. DU VIEUX-LONGUEUIL" in the "sondage" Section and the 'EVAL()' Statement doesn't do anything with that final truncated part of the '!EXTRACT', and in my "Experience" (though always on FF indeed), 'EVAL()' has always been able to handle "by itself" Single and Double Quotes if they already come from the '!EXTRACT', although as your Case was a bit "complex" already, and I always try to use no more than 3 "x,y,z" Vars for building the Return for the 'EVAL()', I had to combine several Commands within each Step, which I rarely do for myself, so it might be safer then to use the "decomposed" Equivalent I had posted that used a separate Temp Var for each Step, with "a,b,c,d,e,z", without combining several Commands per Step...:
chivracq wrote:I can "decompose" the 'EVAL()' Statement into more Sub-Statements, then it's maybe easier to follow...:

Code: Select all

SET URL_nav EVAL("var s='{{!EXTRACT}}', d1='{{Descr_1}}', d2='{{Descr_2}}', x,y,z; x=s.split(d1)[1].split(d2); y=x[1].split('http'); z='http'+y[1].split('\"')[0]; z;")
=> ... becomes:

Code: Select all

SET URL_nav EVAL("var s='{{!EXTRACT}}', d1='{{Descr_1}}', d2='{{Descr_2}}', a,b,c,d,e,z; a=s.split(d1); b=a[1].split(d2); c=b[1].split('http'); d=c[1].split('\"'); e=d[0]; z='http'+e; z;")
=> And you simply "follow" a=>b=>c=>d=>e and =>z that I always use for the "final" Result..., where I each time reuse the previous Expression...
And if "stg" goes wrong, you can easily debug the whole 'EVAL()' by simply changing the last 'z' to any intermediary Var to check them one by one that they already return what you expect...
=> You can try this one if it works "better", + could add a 'SET !ERRORIGNORE YES' as well, is "good Practice" anyway, Script will always abort otherwise if any 'Array[1]' does not exist when doing a Double 'split()' in a same 'EVAL()'...

And to be even "safer", it would be possible to implement some kind of 'END_OF_PAGE' Functionality (a bit like the '!END_OF_PAGE' for iMB/IE) to tell the 'EVAL()' to first truncate the '!EXTRACT' and to ignore the "sondage" Section (which is "luckily" added at the end of the JSON File...):

>>>

[TEMP-Posting, I'm not finished, but I prefer to post this part already, in case I crash my Browser with my Tests, ah-ah...!, happens sometimes, then I would lose my Post... :twisted: ]
Mini-EDIT: Don't worry, I will further post (some Script) in some other/later Post... You can post in the meantime if you want, for example if the "a,b,c,d,e,z" Syntax works better or if '!ERRORIGNORE' makes a Difference already... :wink:
Last edited by chivracq on Tue Oct 30, 2018 7:28 pm, edited 1 time in total.
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
kevnad
Posts: 25
Joined: Wed Mar 02, 2011 3:22 pm

Re: Extracting data of JSON

Post by kevnad » Tue Oct 30, 2018 7:19 pm

I know you have not yet finish your post, but wanted to add this information.

Even I do "nothing" in the EVAL statement, there still a problem.

Like this exemple :

TAG POS=1 TYPE=BODY ATTR=* EXTRACT=TXT
SET URL_nav EVAL("var s='{{!EXTRACT}}';s;")
PROMPT URL_nav:<BR>{{URL_nav}}

I still have the same error, and if I put the ERRORIGNORE, the variable is empty.

I had found the ENDOFPAGE command, but was not able to use for now.

thanks
chivracq
Posts: 7722
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Extracting data of JSON

Post by chivracq » Tue Oct 30, 2018 7:56 pm

kevnad wrote:I know you have not yet finish your post, but wanted to add this information.

Even I do "nothing" in the EVAL statement, there still a problem.

Like this exemple :

Code: Select all

TAG POS=1 TYPE=BODY ATTR=* EXTRACT=TXT
SET URL_nav EVAL("var s='{{!EXTRACT}}';s;")
PROMPT URL_nav:<BR>{{URL_nav}}
I still have the same error, and if I put the ERRORIGNORE, the variable is empty.

I had found the ENDOFPAGE command, but was not able to use for now.

thanks
Yeah, won't be able to use '!ENDOFPAGE' in your Case as you need to first tag some (other) HTML Element on the Page, but in your Case, the whole Content of the whole "Page" is just one single Element...

But hum, before I go further, yep, have to handle this part first if the 'PROMPT' doesn't return anything, even on the simple/raw '!EXTRACT' through 'EVAL()', grrr...!! Seems like we are hitting a "Bug" or a "Limitation" on iMB then... :?

Could be related to some Size Limit in 'EXTRACT' or in 'EVAL()', although I've already extracted much bigger Pages (on 'HTML' or 'BODY' (with 'EXTRACT=TXT' or 'EXTRACT=HTM')), and on FF there is a Size Limit for the 'EXTRACT_TEST_POPUP' and 'PROMPT' but not in 'EVAL()'... And both Commands simply truncated the Data at some point, but they still displayed some large amount already...

Pfff..., OK, trying to find a Workaround... :shock:

1- Do you still get the (full) Extract in the 'EXTRACT_TEST_POPUP'...?

2- Does "PROMPT _{{!EXTRACT}}_" work...?

3- Same Qt's with 'EXTRACT=HTM' instead of 'EXTRACT=TXT'...?

4- Does your 'PROMPT' on 'EVAL()' work using 'EXTRACT=HTM'...?:

Code: Select all

TAG POS=1 TYPE=BODY ATTR=* EXTRACT=HTM
SET URL_nav EVAL("var s='{{!EXTRACT}}'; s;")
PROMPT URL_nav:<BR>_{{URL_nav}}_
5- & 6- Can you try a 'SAVEAS' both with 'EXTRACT=TXT' and '=HTM'...? (In order to bypass the 'PROMPT'...)
Example with 'EXTRACT=TXT':

Code: Select all

TAG POS=1 TYPE=BODY ATTR=* EXTRACT=TXT
SET URL_nav EVAL("var s='{{!EXTRACT}}'; s;")
PROMPT URL_nav:<BR>_{{URL_nav}}_
SET !EXTRACT {{URL_nav}}
SAVEAS TYPE=EXTRACT FOLDER=* FILE=JSON_Test_{{!NOW:yyyy-mm-dd_hhhnn}}.txt
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
kevnad
Posts: 25
Joined: Wed Mar 02, 2011 3:22 pm

Re: Extracting data of JSON

Post by kevnad » Wed Oct 31, 2018 12:01 pm

chivracq wrote:
1- Do you still get the (full) Extract in the 'EXTRACT_TEST_POPUP'...?

2- Does "PROMPT _{{!EXTRACT}}_" work...?

3- Same Qt's with 'EXTRACT=HTM' instead of 'EXTRACT=TXT'...?

4- Does your 'PROMPT' on 'EVAL()' work using 'EXTRACT=HTM'...?:

Code: Select all

TAG POS=1 TYPE=BODY ATTR=* EXTRACT=HTM
SET URL_nav EVAL("var s='{{!EXTRACT}}'; s;")
PROMPT URL_nav:<BR>_{{URL_nav}}_
5- & 6- Can you try a 'SAVEAS' both with 'EXTRACT=TXT' and '=HTM'...? (In order to bypass the 'PROMPT'...)
Example with 'EXTRACT=TXT':

Code: Select all

TAG POS=1 TYPE=BODY ATTR=* EXTRACT=TXT
SET URL_nav EVAL("var s='{{!EXTRACT}}'; s;")
PROMPT URL_nav:<BR>_{{URL_nav}}_
SET !EXTRACT {{URL_nav}}
SAVEAS TYPE=EXTRACT FOLDER=* FILE=JSON_Test_{{!NOW:yyyy-mm-dd_hhhnn}}.txt

1- Yes, I have the full extract with the EXTRACT_TEST_POPUP
2- Yes, the prompt extract works fine
3- Same problem with EXTRACT HTM than TXT
4- No, the EVAL does not work with EXTRACT HTM
5-6 The SAVEAS works fine.

Really, the issue is with the EVAL command.

I'm trying to use the Search command with a REGEXP and EXTRACT option. Still trying to figure out the REGEX to get everything until the sondage section. I think it might work with that since the ' character will not be present.

I'll let you know how it goes!

THanks
Post Reply