How to extract data without break lines?

Find a consultant or advertise your services here
Post Reply
Posts: 7
Joined: Wed Jun 19, 2013 12:07 pm

How to extract data without break lines?

Post by bfdxi » Mon Jun 24, 2013 7:43 am

I fetch a data from here:

Code: Select all||24323030202d20243234392e3939&add_to_pkg=false&pagetype=listing&gf=y
And I use .js to fetch them following:

Code: Select all

var GetFx;
var jsLF = "\n";

macro2 ="CODE:";
macro2 += "SET !ERRORIGNORE YES"	+ jsLF;
macro2 += "SET !ERRORCONTINUE YES" +	jsLF;
macro2 += "SET !EXTRACT_TEST_POPUP NO" +	jsLF;

pagenumber= 1000;
startpage = 1;

while(startpage < pagenumber)

macro2 += "TAG POS="+ i +" TYPE=IMG ATTR=class:thumb* EXTRACT=HREF" + jsLF;
macro2 += "TAG POS="+ i +" TYPE=H3 ATTR=itemprop:name* EXTRACT=TXT" + jsLF;
macro2 += "TAG POS="+ i +" TYPE=A ATTR=itemprop:url* EXTRACT=HREF" + jsLF;
macro2 += "SAVEAS TYPE=EXTRACT FOLDER=* FILE=test.csv" + jsLF;
macro2 += "TAG POS=1 TYPE=A ATTR=TXT:Next<SP>Page"   + jsLF;
GetFx = iimPlay(macro2);
macro2 += "CLEAR" +	jsLF;
And this is a result of class h3 itemprop=name has a multiple break lines following:

Code: Select all


Dynex™ - 32"" Class (31-1/2"" Diag.) - LCD - 720p - 60Hz - HDTV"
So, I want a help for someone to suggest me about deleting multiple break lines before "Dynex..."

Thank you for someone helps.
Posts: 132
Joined: Wed Jul 21, 2010 6:44 am
Location: Karachi, Sindh, Pakistan

Re: How to extract data without break lines?

Post by janib4all » Mon Jul 22, 2013 8:37 am

Use java script .match() function to replace all NEW_LINES to (\n) and later search this term.
Hire the BoT-fReeak!
Post Reply