fix emojis
This commit is contained in:
parent
c45c6992ae
commit
287b1b154f
5 changed files with 39 additions and 32 deletions
|
|
@ -85,7 +85,7 @@ class ApplicationHandler:
|
|||
|
||||
company_label = company.capitalize() if company != "unknown" else "Wohnung"
|
||||
message = (
|
||||
f"🏠 <b>[{company_label}] Neue Wohnung!</b>\n\n"
|
||||
f"<b>[{company_label}] Neue Wohnung!</b>\n\n"
|
||||
f"🚪 <b>{listing['rooms']}</b>\n"
|
||||
f"📏 {listing['size']}\n"
|
||||
f"💰 {listing['price']}\n"
|
||||
|
|
@ -136,7 +136,7 @@ class ApplicationHandler:
|
|||
result = await self.apply(listing)
|
||||
results[listing["id"]] = result
|
||||
self.save_application(result)
|
||||
status = "✅" if result["success"] else "❌"
|
||||
status = "[SUCCESS]" if result["success"] else "[FAILED]"
|
||||
logger.info(f"{status} {listing['address'][:30]}... | {result['message'][:50]}")
|
||||
await asyncio.sleep(2)
|
||||
return results
|
||||
|
|
@ -409,7 +409,7 @@ class ApplicationHandler:
|
|||
else:
|
||||
stats_text = "🎯 Peak time: N/A"
|
||||
|
||||
stats_text = f"""📊 Summary Statistics
|
||||
stats_text = f"""<b>Summary Statistics</b>
|
||||
|
||||
Total listings tracked: {total_listings}
|
||||
|
||||
|
|
@ -632,15 +632,15 @@ Total listings tracked: {total_listings}
|
|||
try:
|
||||
listings = await self._fetch_listings_attempt()
|
||||
if attempt > 0:
|
||||
logger.info(f"✅ Fetch succeeded (attempt {attempt + 1})")
|
||||
logger.info(f"Fetch succeeded (attempt {attempt + 1})")
|
||||
return listings
|
||||
except Exception as e:
|
||||
if attempt < max_retries - 1:
|
||||
wait_time = retry_delay * (2 ** attempt) # Exponential backoff
|
||||
logger.warning(f"⚠️ Fetch failed (attempt {attempt + 1}/{max_retries}): {str(e)[:50]}... Retrying in {wait_time}s")
|
||||
logger.warning(f"Fetch failed (attempt {attempt + 1}/{max_retries}): {str(e)[:50]}... Retrying in {wait_time}s")
|
||||
await asyncio.sleep(wait_time)
|
||||
else:
|
||||
logger.error(f"❌ Fetch failed after {max_retries} attempts")
|
||||
logger.error(f"Fetch failed after {max_retries} attempts")
|
||||
return []
|
||||
|
||||
return []
|
||||
|
|
@ -782,14 +782,14 @@ Total listings tracked: {total_listings}
|
|||
listings = unique_listings
|
||||
|
||||
if not listings:
|
||||
logger.warning("⚠️ No listings parsed")
|
||||
logger.warning("No listings parsed")
|
||||
|
||||
await page.close()
|
||||
logger.info(f"📊 Fetched {len(listings)} listings")
|
||||
logger.info(f"Fetched {len(listings)} listings")
|
||||
return listings
|
||||
|
||||
except Exception as e:
|
||||
logger.error(f"❌ Fetch error: {str(e)[:100]}")
|
||||
logger.error(f"Fetch error: {str(e)[:100]}")
|
||||
return []
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue