Thanx a lot guys. I've tried another way and it work (but it has one big minus). I change htmllib.py in this way: def handle_image(self, src, alt, *args): self.handle_data(alt) self.imagelist.append(src) # this line was added, and imegelist = [] in __init__ Somewhat stupid, how do you think?