On 05/24/2013 07:36 PM, Carlos Nepomuceno wrote:

     <SNIP>
page = urllib2.urlopen("http://example.com/page.html";).read().strip()

#to create the tables list
tables=[[re.findall('<TD>(.*?)</TD>',r,re.S) for r in re.findall('<TR>(.*?)</TR>',t,re.S)] 
for t in re.findall('<TABLE>(.*?)</TABLE>',page,re.S)]


Pretty simple. Good luck!

Only if the page is html, which the OP's was not. It was an image. Try parsing that with regex.



--
DaveA
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to