print(linksself visited_linksself collected_linksunvisited_linksthe line that creates the normalized list of links uses set comprehensionno different from list comprehensionexcept that the result is set of values we'll be covering these in detail in the next once againthe method stops to print out the current valuesso we can verify that we don' have our sets confusedand that difference really was the method we wanted to call to collect unvisited_links we can then add few lines of code that loop over all the unvisited links and add them to the collection as wellfor link in unvisited_linksif link startswith(self url)self collect_links(urlparse(linkpaththe if statement ensures that we are only collecting links from the one websitewe don' want to go off and collect all the links from all the pages on the internet (unless we're google or the internet archive!if we modify the main code at the bottom of the program to output the collected linkswe can see it seems to have collected them allif __name__ ="__main__"collector linkcollector(sys argv[ ]collector collect_links(for link in collector collected_linksprint(linkit displays all the links we've collectedand only onceeven though many of the pages in my example linked to each other multiple timespython link_collector py