Skip to content

Commit

Permalink
Fix kws usage
Browse files Browse the repository at this point in the history
  • Loading branch information
yasserqureshi1 committed Jan 18, 2023
1 parent aea0fd0 commit 72c610e
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 12 deletions.
6 changes: 3 additions & 3 deletions monitors/footlocker/locations.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def US(ITEMS, user_agent, proxy, KEYWORDS, start):


if start == 0 and sizes != '':
if KEYWORDS is None:
if KEYWORDS is []:
to_discord.append(dict(
name=item['name'],
sku=product['sku'],
Expand Down Expand Up @@ -128,7 +128,7 @@ def UK(ITEMS, user_agent, proxy, KEYWORDS, start):


if start == 0 and sizes != '':
if KEYWORDS is None:
if KEYWORDS is []:
to_discord.append(dict(
name=item['name'],
sku=product['sku'],
Expand Down Expand Up @@ -205,7 +205,7 @@ def AU(ITEMS, user_agent, proxy, KEYWORDS, start):


if start == 0 and sizes != '':
if KEYWORDS is None:
if KEYWORDS is []:
to_discord.append(dict(
name=item['name'],
sku=product['sku'],
Expand Down
2 changes: 1 addition & 1 deletion monitors/offspring/monitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ def monitor():
items = remove_duplicates(scrape_main_site(headers, proxy))
for product in items:

if KEYWORDS is None:
if KEYWORDS is []:
# If no keywords set, checks whether item status has changed
comparitor(product, start)

Expand Down
2 changes: 1 addition & 1 deletion monitors/shopify/monitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ def monitor():
items = scrape_site(URL, proxy, headers)
for product in items:

if KEYWORDS is None:
if KEYWORDS is []:
# If no keywords set, checks whether item status has changed
comparitor(product, start)

Expand Down
2 changes: 1 addition & 1 deletion monitors/sivasdescalzo/monitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ def monitor():
items = remove_duplicates(scrape_main_site(headers, proxy))
for item in items:

if KEYWORDS is None:
if KEYWORDS is []:
# If no keywords set, checks whether item status has changed
comparitor(item, start)
else:
Expand Down
2 changes: 1 addition & 1 deletion monitors/snipes/monitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ def monitor():
items = remove_duplicates(scrape_main_site(headers, proxy))
for item in items:

if KEYWORDS is None:
if KEYWORDS is []:
# If no keywords set, checks whether item status has changed
comparitor(item, start)

Expand Down
6 changes: 3 additions & 3 deletions monitors/snkrs/locations.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def standard_api(ITEMS, LOCATION, LANGUAGE, user_agent, proxy, KEYWORDS, start):
try:
for product in item['productInfo']:
if product['availablity']['available'] == True and product['merchProduct']['status'] == 'ACTIVE':
if KEYWORDS is None:
if KEYWORDS is []:
first = 0
sizes = ''
for k in product['availableGtins']:
Expand Down Expand Up @@ -134,7 +134,7 @@ def brazil(ITEMS, LOCATION, LANGUAGE, user_agent, proxy, KEYWORDS, start):
soup = BeautifulSoup(html.text, 'html.parser')
output = soup.find_all('div', {'class': 'produto produto--esgotado'})
for product in output:
if KEYWORDS is None:
if KEYWORDS is []:
item = dict(
title=product.find('h2', {'class': 'produto__detalhe-titulo'}).text,
description=None,
Expand Down Expand Up @@ -204,7 +204,7 @@ def chile(ITEMS, LOCATION, LANGUAGE, user_agent, proxy, KEYWORDS, start):
ITEMS.remove(item)

if sizes != '' and start == 0:
if KEYWORDS is None:
if KEYWORDS is []:
to_discord.append(dict(
title=product['productName'],
description=str(product['items'][0]['color'][0]),
Expand Down
2 changes: 1 addition & 1 deletion monitors/ssense/monitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ def monitor():
items = remove_duplicates(scrape_main_site(user_agent, proxy))
for item in items:

if KEYWORDS is None:
if KEYWORDS is []:
# If no keywords set, checks whether item status has changed
comparitor(item, start)

Expand Down
2 changes: 1 addition & 1 deletion monitors/zalando/monitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ def monitor():
items = remove_duplicates(scrape_main_site(headers, proxy))
for item in items:

if KEYWORDS is None:
if KEYWORDS is []:
# If no keywords set, checks whether item status has changed
comparitor(item, start)

Expand Down

0 comments on commit 72c610e

Please sign in to comment.