Closed grray closed 7 years ago
Dear grray,
Could you, please, change
def get_entered_links(requests_result):
"""Entered giveaway list. ignore it"""
global nedd_next_page_for_entered_link
entered_list=[]
soup=BeautifulSoup(requests_result.text, "html.parser")
links=soup.find_all(class_="table__row-inner-wrap")
for get_link in links:
url=get_link.find(class_="table__column__heading").get("href")
check_geaways_end=get_link.find(class_="table__remove-default is-clickable")
if check_geaways_end!=None:
entered_list.append(url)
elif get_link.find(class_="table__column__deleted")!=None:
continue
else:
nedd_next_page_for_entered_link=False
return entered_list
return entered_list
to
def get_entered_links(requests_result):
"""Entered giveaway list. ignore it"""
global nedd_next_page_for_entered_link
entered_list=[]
soup=BeautifulSoup(requests_result.text, "html.parser")
links=soup.find_all(class_="table__row-inner-wrap")
if links==None:
nedd_next_page_for_entered_link=False
return entered_list
for get_link in links:
url=get_link.find(class_="table__column__heading").get("href")
check_geaways_end=get_link.find(class_="table__remove-default is-clickable")
if check_geaways_end!=None:
entered_list.append(url)
elif get_link.find(class_="table__column__deleted")!=None:
continue
else:
nedd_next_page_for_entered_link=False
return entered_list
return entered_list
and test script? i can not test script now, but i hope, it is fix the issue.
Thanks a lot.
It is working, but my "entered" list is not empty already.
Bug has been fixed.
It hangs when there is no items without "remove" button in this list https://www.steamgifts.com/giveaways/entered, or list is empty.