restructure scrapers, don't run jpl task on dev

This commit is contained in:
Stijn De Clercq 2021-08-08 23:24:16 +02:00
parent e07a2c28d1
commit 49aaa76aff
6 changed files with 46 additions and 42 deletions

View file

@ -2,7 +2,7 @@ import discord
from discord.ext import commands
from decorators import help
from enums.help_categories import Category
from functions.scraping import google_search
from functions.scrapers.google import google_search
class Google(commands.Cog):

View file

@ -5,7 +5,7 @@ from enums.numbers import Numbers
from functions import timeFormatters
from functions.config import config
from functions.database import currency, poke, prison, birthdays, stats
from functions.scraping import getMatchweek
from functions.scrapers.sporza import getMatchweek
from functions import ufora_notifications
import json
import random
@ -228,6 +228,10 @@ class Tasks(commands.Cog):
"""
Task that checks the current JPL matchweek & changes the dict value
"""
# Don't run this when testing
if self.client.user.id != int(constants.didierId):
return
matchweek = getMatchweek()
if matchweek is None: