Clear screen after db update

This commit is contained in:
houndvoyager 2022-11-14 08:39:00 +01:00
parent e707594eb8
commit e6e9d582bc
1 changed files with 13 additions and 3 deletions

16
main.py
View File

@ -1,14 +1,23 @@
import httpx
import time
import modules
import os
from os import system, name, environ
from dotenv import load_dotenv
from supabase import create_client, Client
load_dotenv()
url: str = os.environ.get("SUPABASE_URL")
key: str = os.environ.get("SUPABASE_KEY")
url: str = environ.get("SUPABASE_URL")
key: str = environ.get("SUPABASE_KEY")
supabase: Client = create_client(url, key)
def clear():
if name == 'nt':
_ = system('cls')
else:
_ = system('clear')
def scraper():
transport = httpx.HTTPTransport(retries=5)
@ -40,6 +49,7 @@ def post(item):
while True:
try:
scraper()
clear()
except Exception as e:
print(e)
print("Database updated")