Update app.py
Browse files
app.py
CHANGED
|
@@ -309,7 +309,7 @@ def generate_email(name, email, prospect_name, linkedin_url, website_url, contex
|
|
| 309 |
if not website_content:
|
| 310 |
# If direct scraping fails, fall back to the sitemap
|
| 311 |
website_urls = parse_sitemap(website_sitemap_url)
|
| 312 |
-
if isinstance(
|
| 313 |
for url in urls:
|
| 314 |
website_content = safe_extract_content(url)
|
| 315 |
if website_content:
|
|
@@ -322,7 +322,7 @@ def generate_email(name, email, prospect_name, linkedin_url, website_url, contex
|
|
| 322 |
if not company_content:
|
| 323 |
# If direct scraping fails, fall back to the sitemap
|
| 324 |
company_urls = parse_sitemap(company_sitemap_url)
|
| 325 |
-
if isinstance(
|
| 326 |
for url in urls:
|
| 327 |
company_content = safe_extract_content(url)
|
| 328 |
if company_content:
|
|
|
|
| 309 |
if not website_content:
|
| 310 |
# If direct scraping fails, fall back to the sitemap
|
| 311 |
website_urls = parse_sitemap(website_sitemap_url)
|
| 312 |
+
if isinstance(website_urls, list):
|
| 313 |
for url in urls:
|
| 314 |
website_content = safe_extract_content(url)
|
| 315 |
if website_content:
|
|
|
|
| 322 |
if not company_content:
|
| 323 |
# If direct scraping fails, fall back to the sitemap
|
| 324 |
company_urls = parse_sitemap(company_sitemap_url)
|
| 325 |
+
if isinstance(company_urls, list):
|
| 326 |
for url in urls:
|
| 327 |
company_content = safe_extract_content(url)
|
| 328 |
if company_content:
|