Don't check sale games if sale is ended

This commit is contained in:
tauqua 2020-09-08 14:44:59 -05:00
parent 83660dbfc2
commit 2b39e7c5dd

View file

@ -119,7 +119,11 @@ def extract_from_itch_group(group_page):
OUTPUT urls of all games, urls of games that avie noted is connected to more sales
'''
soup = BeautifulSoup(group_page, 'lxml')
ended = soup.find_all('div', class_ = 'not_active_notification')
urls, more = set(), set()
if ended:
print(" Sale ended")
return urls, more
games = soup.find_all('div', class_='game_cell')
for game in games:
url = game.find('a').get('href')