[EMAIL PROTECTED] wrote:
> sorry guys, here is the code
> 
>     for incident in bs('a',  {'class' : 'price'}):
>         price = ""
>         for oText in incident.fetchText( oRE):
>               price += oText.strip() + "','"
> 
>     for incident in bs('div',  {'class' : 'store'}):
>         store = ""
>         for oText in incident.fetchText( oRE):
>             store += oText.strip() + "','"
> 
>     for incident in bs('h2',  {'id' : 'food'}):
>       food = ""
>       for oText in incident.fetchText( oRE):
>             food += oText.strip() + "','"
> 

I would use a loop that finds the row for a single item with something like
for item in bs('tr',  {'class' : 'base'}):

then inside the loop fetch the values for store, food and price for that 
item and write them to your output file.

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

Reply via email to