Working with a couple of lists, iterating over each. Here's a code segment:
self.links = []
self.iter=iter(self.links)
for tgt in self.links:
for link in self.mal_list:
print(link)
if tgt == link:
print("Found Suspicious Link: {0}".format(tgt))
self.count += 1
else:
self.count += 1
self.crawl(self.iter.next())
Its advancing to the next item in the link list, just fine. For the malware signature list I tried using a similar iter item, but I'm not entirely sure if thats even the best way, and if so were to place it in my code so that each link that is urlopened from the list is compared to every item in the malware list BEFORE the loop opens up the next item in the link list. Any suggestions?