Extraction of a table

Discussions and Tech Support related to website data extraction, screen scraping and data mining using iMacros.

Moderators: Marcia, iOpus, Hannes, iOpus, Tech Support, Tom, iOpus

Extraction of a table

Postby pierrreg on Tue Nov 03, 2009 4:51 pm

Hi all,

I would like to extract the figures below the chart: "Carnet d'ordres NYSE Euronext Paris"
in this link:
https://www.cortalconsors.fr/euroWebFr/-?$part=financeinfosHome.Desks.stocks.Desks.snapshot.Desks.snapshotoverview.content.snapshot.snapshot.data.Left.QuoteInformation.Orderbook&$event=switch&id=FR0010613471&id_name=ISIN&exchange=PAR&userAction=true

I have done this:

Code: Select all
TAG POS=2 TYPE=TR ATTR=CLASS:even EXTRACT=TXT
SAVEAS TYPE=EXTRACT FOLDER=* FILE=dow.txt


But when I extract it in the file, there are lots of "blank" characters. This is very annoying.
This is the best I have found.

Is it possible to extract it line by line, without blank characters. Or, at best, extract it in one shot.

Thank you

:wink:
pierrreg
 
Posts: 49
Joined: Thu Sep 04, 2008 5:09 am

Re: Extraction of a table

Postby Hannes, iOpus on Wed Nov 04, 2009 2:05 am

Using relative positioning, you can get the table in one step indeed:
Code: Select all
'anchor
TAG POS=2 TYPE=TR ATTR=CLASS:even
'relative extraction
TAG POS=R-1 TYPE=TABLE ATTR=TXT:* EXTRACT=TXT

This, however, does not avoid the "empty field" issue, as the underlying HTML code indeed contains these empty fields. The extraction can't tell which fields are relevant.

When you call the macro from a script, you can use the script's means to "cut out" unwanted fields.
Hannes, iOpus Support
Hannes, iOpus
 
Posts: 1838
Joined: Thu Sep 21, 2006 6:27 am

Re: Extraction of a table

Postby pierrreg on Fri Nov 06, 2009 6:32 am

Hi, when I extract, I get a lot of: """

"""5"",""913"",""45.220""
""3"",""914"",""45.215""
""1"",""219"",""45.210""
""1"",""200"",""45.200""
""1"",""650"",""45.190""
""

Is it possible to extract this with less ""?
thank you
pierrreg
 
Posts: 49
Joined: Thu Sep 04, 2008 5:09 am

Re: Extraction of a table

Postby Hannes, iOpus on Mon Nov 09, 2009 1:52 am

There should be just one pair of double quotation marks around each entry. What version of iMacros do you use?
Hannes, iOpus Support
Hannes, iOpus
 
Posts: 1838
Joined: Thu Sep 21, 2006 6:27 am


Return to Data Extraction and Web Screen Scraping

Who is online

Users browsing this forum: No registered users and 2 guests