felix1212 wrote:The site is an internal web interface of an appliance and I tried to save as complete HTML. I also attached the result csv file as well. Please take a look.
I did try this before as you can see from my code I shared in my question post. Since there was one I don't wanna remove the comma(which is the date field I added at the beginning. If I do so, it will mess up with the first data I'm reading in), I tried to remove all commas for all data and reconstruct the !EXTRACT from setting the !EXTRACT to the !VAR1 I use to hold my correct answer. Still, it shows the exact thing with those [EXTRACTS] in the csv.
Ah OK, perfect with the '.zip' Attachment, now I understand much better, ah-ah...!
And hum, I see indeed those '[EXTRACT]''s in your '.csv' from after "09/08/2017", strange...:
Code: Select all
09/07/2017,52029,70813,10898,6691,6849,122,25,147427
09/08/2017,47165,61253,6840,5949,5517,75,2,126801
09/14/2017[EXTRACT]116945[EXTRACT]24827[EXTRACT]23930[EXTRACT]5241[EXTRACT]7736[EXTRACT]911[EXTRACT]111[EXTRACT]179701
Thanks to the 'HTML Saveas', I was able to do a bit of Testing, and your cumbersome 8x 'replace()' Syntax does the "job" indeed, but OK, I prefer mine, ah-ah...!
But if I run your Script, the Data then gets saved "correctly" for me:
Code: Select all
"09/14/2017","115553","24656","23838","5188","7589","894","111","177829"
I'm using iMacros for FF (v8.8.2) which tends to add Double Quotes around the Data...
I improved btw a bit the "Quality" (= Reliability + Readability) of your Script...:
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/Felix1212/SEA%20-%20asiampx002%20-%20Volume%20lines%20report%20for%20today.htm
SET !EXTRACT {{!NOW:mm/dd/yyyy}}
'Extract all Totals:
TAG POS=1 TYPE=DIV ATTR=TXT:Legitimate
TAG POS=R7 TYPE=DIV ATTR=CLASS:ellipsis EXTRACT=TXT
'>
TAG POS=1 TYPE=DIV ATTR=TXT:Bulk<SP>messages
TAG POS=R7 TYPE=DIV ATTR=CLASS:ellipsis EXTRACT=TXT
'>
TAG POS=1 TYPE=DIV ATTR=TXT:Blocked<SP>connections
TAG POS=R7 TYPE=DIV ATTR=CLASS:ellipsis EXTRACT=TXT
'>
TAG POS=1 TYPE=DIV ATTR=TXT:Spam<SP>medium
TAG POS=R7 TYPE=DIV ATTR=CLASS:ellipsis EXTRACT=TXT
'>
TAG POS=1 TYPE=DIV ATTR=TXT:Spam<SP>high
TAG POS=R7 TYPE=DIV ATTR=CLASS:ellipsis EXTRACT=TXT
'>
TAG POS=1 TYPE=DIV ATTR=TXT:Other
TAG POS=R7 TYPE=DIV ATTR=CLASS:ellipsis EXTRACT=TXT
'>
TAG POS=1 TYPE=DIV ATTR=TXT:Viruses
TAG POS=R7 TYPE=DIV ATTR=CLASS:ellipsis EXTRACT=TXT
'>
TAG POS=1 TYPE=DIV ATTR=TXT:Total
TAG POS=R7 TYPE=DIV ATTR=CLASS:ellipsis EXTRACT=TXT
'Clean Data to remove all Commas in the extracted Numbers:
SET !VAR1 EVAL("var s='{{!EXTRACT}}'; var z=s.split(',').join(''); z;")
PROMPT Original<SP>EXTRACT:<BR>_{{!EXTRACT}}_<BR><BR>VAR1:<BR>_{{!VAR1}}_
SET !EXTRACT {{!VAR1}}
'SAVEAS TYPE=EXTRACT FOLDER=\\SERVER\d$\IMPORT\ FILE=result.csv
SAVEAS TYPE=EXTRACT FOLDER=* FILE=_Felix1212_EXTRACT_1.csv
'TAG POS=1 TYPE=A ATTR=TXT:Log<SP>Out
(Tested on iMacros for FF v8.8.2, Pale Moon v26.3.3 (=FF47), Win10-x64.)
And this Script gives the same Results of course in the 'SAVEAS'...!
But OK, your Pb is now that the '[EXTRACT]''s do not get converted to Commas for you in your 'SAVEAS' and you can see that it works for me on FF... And it used to work for you as well until 2017/09/08... So, stg must have changed since...!
Well, iMB and iMacros for IE use the Data Separator Setting from the Regional Settings on Windows Environments, so it's possible that you are using some "exotic" Language for your 'Windows Server 2012 R2' OS (some recent Update maybe...?) and/or that that Setting was modified recently.
=> Check that Setting in your Regional Settings.
Try setting it (temporarily) to a Semi-Colon for example, if it's already/still a Comma, run your Script with the Semi-Colon to check that it is taken into account, and reset it then manually to the Comma.
I don't know about iMB v12.0 which is very recent and nobody has reported a similar Issue on the Forum, but if you tested with some previous v10 Versions for iMB and iMacros for IE, that Mechanism works in v10, and it was working for you until recently as well...
I don't know for iMB (that I have never used), but check as well which Language and Character Encoding are being used by your Browser, in case there is some "Incompatibility" to read/convert the Comma from the Regional Settings.
And you could try running your Script on FF or CR of course...
(On FF, you can even use the '!DATASOURCE_DELIMITER' Command to play with that Setting, as iMacros for FF doesn't use the Regional Setting...)
Well, good luck, but you know now that it works on FF, and you know in which "Direction" you can go investigating...
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE'/'Trial').
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...