bugfix
This commit is contained in:
@@ -1160,7 +1160,7 @@ def _process_single_row(self, row_num, row_data, process_wiki=True, process_chat
|
|||||||
# Hole den Firmennamen aus Spalte B (Index 1)
|
# Hole den Firmennamen aus Spalte B (Index 1)
|
||||||
company_name = row_data[1] if len(row_data) > 1 else ""
|
company_name = row_data[1] if len(row_data) > 1 else ""
|
||||||
|
|
||||||
# Hole die CRM-Website (Spalte D, Index 3). Falls keine Website vorhanden ist, führe den SERP-API Lookup durch.
|
# Hole die CRM-Website aus Spalte D (Index 3). Falls keine Website vorhanden ist, führe SERP-API Lookup durch.
|
||||||
website_url = row_data[3] if len(row_data) > 3 else ""
|
website_url = row_data[3] if len(row_data) > 3 else ""
|
||||||
if website_url.strip() == "" or website_url.strip().lower() == "k.a.":
|
if website_url.strip() == "" or website_url.strip().lower() == "k.a.":
|
||||||
new_website = serp_website_lookup(company_name)
|
new_website = serp_website_lookup(company_name)
|
||||||
@@ -1174,10 +1174,11 @@ def _process_single_row(self, row_num, row_data, process_wiki=True, process_chat
|
|||||||
else:
|
else:
|
||||||
debug_print(f"Zeile {row_num}: Keine Website gefunden für {company_name}.")
|
debug_print(f"Zeile {row_num}: Keine Website gefunden für {company_name}.")
|
||||||
|
|
||||||
# Website-Scraping: Für jeden Account soll die Website gescrapt werden.
|
# Website-Scraping:
|
||||||
# Das Ergebnis (Title, Description, H1, H2, H3) wird in Spalte AQ ausgegeben.
|
# Hier soll die Website gescrapt werden – *unabhängig* von jeglichen Flaggen in Spalte A.
|
||||||
website_details = "k.A."
|
website_details = "k.A."
|
||||||
if website_url.strip() != "" and website_url.strip().lower() != "k.a.":
|
if website_url.strip() != "" and website_url.strip().lower() != "k.a.":
|
||||||
|
# Rufe scrape_website_details auf, um Title, Description, H1, H2, H3 zu extrahieren.
|
||||||
website_details = scrape_website_details(website_url)
|
website_details = scrape_website_details(website_url)
|
||||||
debug_print(f"Zeile {row_num}: Gescrappte Website-Details (erste 100 Zeichen): {website_details[:100]}")
|
debug_print(f"Zeile {row_num}: Gescrappte Website-Details (erste 100 Zeichen): {website_details[:100]}")
|
||||||
try:
|
try:
|
||||||
@@ -1187,7 +1188,7 @@ def _process_single_row(self, row_num, row_data, process_wiki=True, process_chat
|
|||||||
debug_print(f"Zeile {row_num}: Fehler beim Update von Spalte AQ: {e}")
|
debug_print(f"Zeile {row_num}: Fehler beim Update von Spalte AQ: {e}")
|
||||||
else:
|
else:
|
||||||
debug_print(f"Zeile {row_num}: Kein gültiger Website-URL vorhanden, Website-Scraping wird übersprungen.")
|
debug_print(f"Zeile {row_num}: Kein gültiger Website-URL vorhanden, Website-Scraping wird übersprungen.")
|
||||||
|
|
||||||
# Weiterer Verarbeitungsteil: Wikipedia-Verarbeitung (falls process_wiki True)
|
# Weiterer Verarbeitungsteil: Wikipedia-Verarbeitung (falls process_wiki True)
|
||||||
wiki_update_range = f"L{row_num}:R{row_num}"
|
wiki_update_range = f"L{row_num}:R{row_num}"
|
||||||
dt_wiki_range = f"AN{row_num}"
|
dt_wiki_range = f"AN{row_num}"
|
||||||
@@ -1278,6 +1279,7 @@ def _process_single_row(self, row_num, row_data, process_wiki=True, process_chat
|
|||||||
f"Servicetechniker-Schätzung: {st_estimate}")
|
f"Servicetechniker-Schätzung: {st_estimate}")
|
||||||
time.sleep(Config.RETRY_DELAY)
|
time.sleep(Config.RETRY_DELAY)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# ==================== ALIGNMENT DEMO FÜR HAUPTBLATT UND CONTACTS ====================
|
# ==================== ALIGNMENT DEMO FÜR HAUPTBLATT UND CONTACTS ====================
|
||||||
def alignment_demo_full():
|
def alignment_demo_full():
|
||||||
|
|||||||
Reference in New Issue
Block a user