def find_all_items(site):
site = urllib.urlopen(site).read()
all_items = re.findall(r'watch\.asp\?\w+\=\w*\&\w*\=\w+',site)
next_page = re.findall(r'Watches\.asp\?\w+\=[0-9]+\&pg\=\w+',site)
try:
find_all_items(urllib.basejoin("<some url>",next_page[0]))
except IndexError:
pass
return remove_dups(all_items) # ,<---- this removes all the duplicate items
How do i keep the value of all_items that i have within the first function call and return a list of all the items at once also from the second function call
Now the list is being overwritten