Clear screen after db update
This commit is contained in:
parent
e707594eb8
commit
e6e9d582bc
16
main.py
16
main.py
|
@ -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")
|
||||
|
|
Loading…
Reference in New Issue