On Tue, Oct 16, 2012 at 7:52 AM, Norman Khine <nor...@khine.net> wrote: > > thanks, i made the changes https://gist.github.com/3891927
On line 67, use the result of soup.findAll directly: assoc_data.extend(assoc_cont.renderContents() for assoc_cont in soup.findAll('td', {'width': '49%', 'class': 'menu2' })) On line 72, can't the result of findAll() be subscripted, if you only want the first item? For example: assoc_tel = soup.findAll('td', {'width': '45%', 'class': 'menu2'}) assoc_data.append(assoc_tel[0].renderContents()) On line 80 you can use writerows instead: with open('nimes_assoc.csv', 'wb') as f: csv.writer(f).writerows(assoc_table) _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor