It can be useful to return the links list

This commit is contained in:
Rémi Oudin 2018-02-21 23:11:57 +01:00
parent 4e6ac5ac7b
commit 236e15296c

View file

@ -51,11 +51,12 @@ def url_getter(html, current_page, root_url):
## uniqifier works with python <= 3.6 ## uniqifier works with python <= 3.6
#seen = set() #seen = set()
#links_list = [x for x in links_list if x not in seen and not seen.add(x)] #links_list = [x for x in links_list if x not in seen and not seen.add(x)]
# uniqifier # uniqifier
# Works only with python >= 3.6 # Works only with python >= 3.6
links_list = list(dict.fromkeys(seq)) links_list = list(dict.fromkeys(seq))
return links_list