Discussion Thread
Data Extractor
Message Thread

Extract any data, including email addresses and URLs from your files and webpages.
Posted in the Data Extractor Forum.
Extract Table Data
I have a need to extract table data from webpages. Is there a pre-written rule to do this?
I am not a programmer, and this will be one-time extraction, so I can not justify much money to allot to this.
I'm evaluating several products for the job, and Data Extractor looks like a good fit.
Thanks!
Extract Table Data
We took a look at this and thought that we could create one for you:
1. Create a new rule in Data Extractor; select the second tab and clicking 'New'.
2. Type a descriptive name for your rule and click OK.
3. Then click 'Edit Rule details'.
4. Select the 'HTML Webpage script' option on the right.
5. Copy and paste the rule below into the 'Rule Details' text area.
///////////////
var tables = document.all.tags('TABLE');
var rows;
var cells;
var maxCells = 1;
if (tables) {
for (var t=0; ttables.length; t++) {
rows = tables[t].all.tags('TR');
if (tables[t].all.tags('TABLE').length == 0) {
for (var r=0; rrows.length; r++) {
if (rows[r].innerText != '') {
cells = rows[r].all.tags('TD');
DataExtractor.StartNewResult();
for (var c=0; ccells.length; c++) {
if (c maxCells) {
maxCells = c;
DataExtractor.SetColumns(maxCells);
DataExtractor.AddHeader(c, 'Cell ' + c);
}
DataExtractor.AddResult(c+1, cells[c].innerText);
}
}
}
}
}
}
Extract Table Data
One problem, our forum does not correctly display the rule, I'll email it to you.
Extract Table Data
We've added the script here:
http://www.iconico.com/Da...Tables.txt
You may install it by doing the following:
1. Create a new rule in Data Extractor; select the second tab and clicking 'New'.
2. Type a descriptive name for your rule and click OK.
3. Then click 'Edit Rule details'.
4. Select the 'HTML Webpage script' option on the right.
5. Copy and paste the rule into the 'Rule Details' text area.
Extract Table Data
The table data extraction javascript posted above and linked in the .txt does not produce any results. Can you verify the code is working correctly?
Extract Table Data
With the text link please make sure that you view the source of the page, if the rule appears to all be on one line then it will not function, there are line breaks in the code that are required.
Extract Table Data
Hello Nico,
Using the above Format I tried to extract the table data from this webpage:
http://www.text-link-ads.com/Autos-C45
Instead of the complete Data from this page I just got the Data as shown below:
________________________________________________________________
text link ads post level ads
text link ads rss ads affiliate program free tools
testimonials faq's our blog
$150.00 (+$0.00) / Month
$150.00 (+$0.00) / Month
$150.00 (+$0.00) / Month
$150.00 (+$0.00) / Month
$150.00 (+$0.00) / Month
$144.00 (+$0.00) / Month
$125.00 (+$0.00) / Month
$120.00 (+$0.00) / Month
$120.00 (+$0.00) / Month
$100.00 (+$0.00) / Month
$100.00 (+$0.00) / Month
$90.00 (+$0.00) / Month
$90.00 (+$0.00) / Month
$85.00 (+$0.00) / Month
$84.00 (+$0.00) / Month
________________________________________________________________
I didn't get any data contained in the Table.
Can you please help me out with this.
Thanks,
Allen
Extract Table Data
You posted this in athother thread too. I don't have a login to the website you list, but it should work just fine.