silly, initialize serial outside of loop

This commit is contained in:
Sanj 2012-05-08 21:55:47 +05:30
parent ac03ca17a8
commit bb0f93d4c2

View File

@ -30,9 +30,9 @@ def saveTrain(url, no, line):
train.save()
d = pq(url=url)
table = d.find('table')[3]
serial = 0
for tr in table.iterfind('tr'):
children = tr.getchildren()
serial = 0
if len(tr.findall('td')) > 0:
td0 = children[0]
a = td0.find('a')