diff --git a/Shitpost.py b/Shitpost.py index bbe533c..267ff51 100644 --- a/Shitpost.py +++ b/Shitpost.py @@ -16,6 +16,7 @@ class Shitpost(commands.Cog): def __init__(self, bot): self.bot = bot self.hdConImpatientEvents = [] + self.userAgent = 'Mozilla/5.0 (X11; Linux x86_64; rv:136.0) Gecko/20100101 Firefox/136.0' try: with open('black.txt') as zwart: self.zwarte_lijst = [line.rstrip('\n') for line in zwart] @@ -811,7 +812,10 @@ class Shitpost(commands.Cog): def get_zaagmans(self): zaagman_url = "http://iszaagmansallangsgeweest.nl/" - zreq = requests.get(zaagman_url) + headers = { + 'User-Agent': self.userAgent, + } + zreq = requests.get(zaagman_url, headers=headers) if zreq: return zreq.text.partition("

")[2].partition("

")[0] else: