pj2
This commit is contained in:
@@ -12,10 +12,10 @@ def get_quote():
|
||||
quote = data.get('content') or data.get('advice') or data.get('q') or "Citatul nu a putut fi găsit."
|
||||
author = data.get('author') or data.get('a') or "Autor necunoscut"
|
||||
|
||||
print("-" * 30)
|
||||
print(f"CITAT: {quote}")
|
||||
print(f"AUTOR: {author}")
|
||||
print("-" * 30)
|
||||
with open("quote.txt", "w") as f:
|
||||
f.write(f"📜 *\"{quote}\"* \n\n✍️ **{author}**")
|
||||
except Exception as e:
|
||||
print(f"Eroare la apelarea API-ului: {e}")
|
||||
sys.exit(1)
|
||||
Reference in New Issue
Block a user