Basil Shubin wrote: > Hi friends, > > Please, examine attached script. I want fetch some data from online > resource and almost achieve this, but I can't fetch some weird formatted > data like this '45° Reverse Calf Press'. I got the following error: > > 45 > Reverse Calf Press > Reverse Calf Raise > Seated Reverse Calf Press > Traceback (most recent call last): > File "net_exrx.py", line 226, in ? > exercisesList = LoadExercisesList(2, 4, 9) > File "net_exrx.py", line 86, in LoadExercisesList > return parser.GetExercisesList() > File "net_exrx.py", line 176, in GetExercisesList > self.exerList.append([self.desc[i],self.urls[i]]) > IndexError: list index out of range > Apparently self.desc has more entries than self.urls. This would happen if handle_data() is called more than once for an <a> tag. If you put some print statements in your program you can probably figure out why this is happening.
Kent _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor