[Tutor] Parsing html tables and using numpy for subsequent processing

Gerard Flanagan grflanagan at gmail.com
Wed Sep 16 12:57:33 CEST 2009


David Kim wrote:
> Hello all,
> 
> I've finally gotten around to my 'learn how to parse html' project. For 
> those of you looking for examples (like me!), hopefully it will show you 
> one potentially thickheaded way to do it.
>[...]
> 
> The code can be found at pastebin: 
> http://financialpython.pastebin.com/f4efd8930
> The original html can be found at 
> http://www.dtcc.com/products/derivserv/data/index.php (I am pulling and 
> parsing tables from all three sections).
> 

Doing something similar at the minute if you want to compare:

     http://bitbucket.org/djerdo/tronslenk/src/tip/data/scrape_translink.py


Not very pretty, but I imagine there are very few pretty examples of 
this kind of thing. I'll add more comments...honest. Nothing obviously 
wrong with your code to my eyes.

Regards

g.



More information about the Tutor mailing list