added more channels, handle amazon specifically in stockinformer
This commit is contained in:
parent
505249bcf4
commit
2417c53970
36
app.py
36
app.py
@ -16,12 +16,29 @@ URL_REGEX = re.compile(
|
||||
PARTALERT_ASIN = re.compile("asin=(?P<asin>[0-9a-zA-Z]{1,10})")
|
||||
PARTALERT_TLD = re.compile("tld=(?P<tld>\.(?:it|es|de|fr|co\.uk))")
|
||||
|
||||
MONITORED_CHANNELS = [802674527850725377, 802674601519611925, 755728127069519913,
|
||||
802674384120446996, 755727814912901170, 783425011116539964,
|
||||
783682409635250187, 761002102804709448, 802674800786145311,
|
||||
758224323843850250, 760577787332788315, 802674552541806662,
|
||||
706910639959834738, 802674584473567303, 839507735531749446,
|
||||
833700313819119676, 713321461124694056, 721009876893040682]
|
||||
# consoles
|
||||
PS5_CHANNELS = [713321461124694056, 721009876893040682,
|
||||
781965674838753331, 802674800786145311,
|
||||
780190141599580161, 780190104357961759]
|
||||
|
||||
# gpus
|
||||
FOUNDERS_CHANNELS = [802674384120446996]
|
||||
RTX3060_CHANNELS = [809731473669619730] + FOUNDERS_CHANNELS
|
||||
RTX3060TI_CHANNELS = [783682409635250187, 783425011116539964,
|
||||
802674527850725377, 796451904401834015] + FOUNDERS_CHANNELS
|
||||
RTX3070_CHANNELS = [755728127069519913, 761002102804709448,
|
||||
802674552541806662, 796451880224948274] + FOUNDERS_CHANNELS
|
||||
RTX3070TI_CHANNELS = [839507735531749446,
|
||||
849924994686910504] + FOUNDERS_CHANNELS
|
||||
RTX3080_CHANNELS = [755727814912901170, 758224323843850250,
|
||||
802674584473567303, 796451854808121414] + FOUNDERS_CHANNELS
|
||||
RTX3080TI_CHANNELS = [833700313819119676,
|
||||
849924965842419722] + FOUNDERS_CHANNELS
|
||||
RTX3090_CHANNELS = [755728368413966387, 760577787332788315,
|
||||
796451832968642561] + FOUNDERS_CHANNELS
|
||||
|
||||
MONITORED_CHANNELS = set(PS5_CHANNELS + RTX3060_CHANNELS + RTX3060TI_CHANNELS + RTX3070_CHANNELS +
|
||||
RTX3070TI_CHANNELS + RTX3080_CHANNELS + RTX3080TI_CHANNELS + RTX3090_CHANNELS)
|
||||
|
||||
load_dotenv()
|
||||
|
||||
@ -54,8 +71,10 @@ def get_stockinformer_url(url: str) -> str:
|
||||
|
||||
if "stockinformer" in url:
|
||||
return f"https://stockinformer.co.uk/{url}"
|
||||
elif "amazon" in url:
|
||||
return f"{url.split('?')[0]}"
|
||||
|
||||
return f"{url.split('?')[0]}"
|
||||
return url
|
||||
|
||||
return None
|
||||
|
||||
@ -147,9 +166,6 @@ def on_message(resp):
|
||||
for f in [x['value'] for x in e['fields']]:
|
||||
urls.extend(URL_REGEX.findall(f))
|
||||
|
||||
if not urls:
|
||||
print(m)
|
||||
|
||||
if (urls):
|
||||
check_urls(urls)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user