Merge pull request #7 from tauqua/no-sale

Don't check sale games if sale is ended
This commit is contained in:
Iron-Row 2020-09-08 23:02:06 +03:00 committed by GitHub
commit 3c8f588f7e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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')