Compare commits
No commits in common. "67bec0508e0464a24d562ec26b977987ee5b8b5f" and "5553d6fda25be655f85044894d1750ca99aeffb1" have entirely different histories.
67bec0508e
...
5553d6fda2
6
app.py
6
app.py
@ -1,6 +1,7 @@
|
||||
import discum
|
||||
from typing import List
|
||||
import webbrowser
|
||||
from discord.ext.commands import Bot
|
||||
import re
|
||||
from bs4 import BeautifulSoup
|
||||
import requests
|
||||
@ -10,7 +11,8 @@ from os import getenv
|
||||
PRICE_REGEX = re.compile(
|
||||
"(?:(?P<currency>[GBP|EUR|£|€])(?P<price>[0-9]+(?:\.[0-9]{1,2})))")
|
||||
MODEL_REGEX = re.compile("[Rr][Tt][Xx] ?(?P<model>30[6789]0( [Tt][Ii])?).?")
|
||||
URL_REGEX = re.compile("(?:(?:https?|ftp):\/\/|\b(?:[a-z\d]+\.))(?:(?:[^\s()<>]+|\((?:[^\s()<>]+|(?:\([^\s()<>]+\)))?\))+(?:\((?:[^\s()<>]+|(?:\(?:[^\s()<>]+\)))?\)|[^\s`!()\[\]{};:'.,<>?«»“”‘’]))?")
|
||||
|
||||
URL_REGEX = "(?:(?:https?|ftp):\/\/|\b(?:[a-z\d]+\.))(?:(?:[^\s()<>]+|\((?:[^\s()<>]+|(?:\([^\s()<>]+\)))?\))+(?:\((?:[^\s()<>]+|(?:\(?:[^\s()<>]+\)))?\)|[^\s`!()\[\]{};:'.,<>?«»“”‘’]))?"
|
||||
|
||||
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))")
|
||||
@ -121,7 +123,7 @@ def on_message(resp):
|
||||
content = m['content']
|
||||
|
||||
if channelID in MONITORED_CHANNELS:
|
||||
urls = URL_REGEX.findall(content)
|
||||
urls = re.findall(URL_REGEX, content)
|
||||
|
||||
if (urls):
|
||||
check_urls(urls)
|
||||
|
Loading…
Reference in New Issue
Block a user