Adauga comenzi Telegram pentru solduri si repara get_telegram_chat_id

- Adauga /scrape_solduri - scraping rapid doar solduri (fara CSV tranzactii)
- Adauga /solduri - afisare instant solduri din cache (fara 2FA)
- Redenumeste comenzi pentru consistenta
- Adauga suport BALANCES_ONLY in scraper (skip download tranzactii)
- Repara get_telegram_chat_id.py - elimina input() interactiv
- Imbunatateste output get_telegram_chat_id.py cu info bot si formatare

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-11-11 01:03:02 +02:00
parent 7e8dadcbdc
commit e2ec15939c
3 changed files with 163 additions and 62 deletions

View File

@@ -93,8 +93,14 @@ class BTGoScraper:
def run(self):
"""Entry point principal - orchestreaza tot flow-ul"""
try:
# Check dacă rulăm în mod balances_only
balances_only = os.getenv('BALANCES_ONLY', 'false').lower() == 'true'
logging.info("=" * 60)
logging.info("Start BTGO Scraper")
if balances_only:
logging.info("Start BTGO Scraper (DOAR SOLDURI)")
else:
logging.info("Start BTGO Scraper")
logging.info("=" * 60)
with sync_playwright() as p:
@@ -115,9 +121,11 @@ class BTGoScraper:
accounts = self.read_accounts()
csv_path, json_path = self.save_results(accounts)
# Descarcă tranzacții pentru toate conturile (optional)
# Descarcă tranzacții pentru toate conturile (doar dacă nu e balances_only)
downloaded_files = []
if self.config.DOWNLOAD_TRANSACTIONS:
if balances_only:
logging.info("Mod DOAR SOLDURI - skip download tranzactii")
elif self.config.DOWNLOAD_TRANSACTIONS:
downloaded_files = self.download_transactions(accounts)
else:
logging.info("Download tranzacții dezactivat (DOWNLOAD_TRANSACTIONS=false)")