Pastoid

import TableParse im

The page you are looking at now is at this URL: http://pastoid.com/at0

This paste was last updated on March 24, 2009 at 12:06 pm.

php coderaw

import TableParse
import csv
 
html='<table border="1"><tr><th>Heading</th><th>Another Heading</th></tr><tr><td>row 1, cell 1</td><td>row 1, cell 2</td></tr><tr><td>row 2, cell 1</td><td>row 2, cell 2</td></tr></table> '
nodes=TableParse.parse(html)
 
c=csv.writer(open('data', 'w'))
 
for i in range(0,len(nodes)):
   c.writerow(nodes[i])
 
'''
data contains:
 
Heading,Another Heading
 
"row 1, cell 1","row 1, cell 2"
"row 2, cell 1","row 2, cell 2"
'''

Toggle wordwrap

Referring DomainHits
Unknown Referer 115
pastoid.com 4
search.live.com 2
Is this paste spam?
<Hide