fix(explorer): resolve initialization and import errors for v0.7.0 backend
This commit is contained in:
@@ -267,3 +267,15 @@ class ScraperService:
|
||||
except Exception as e:
|
||||
logger.error(f"Critical error in _parse_html: {e}", exc_info=True)
|
||||
return {"title": "", "description": "", "text": "", "emails": [], "error": str(e)}
|
||||
|
||||
# --- HELPER FUNCTION FOR EXTERNAL USE ---
|
||||
def scrape_website_content(url: str) -> Optional[str]:
|
||||
"""
|
||||
Simple wrapper to get just the text content of a URL.
|
||||
Used by ClassificationService.
|
||||
"""
|
||||
scraper = ScraperService()
|
||||
result = scraper.scrape_url(url)
|
||||
if result and result.get("text"):
|
||||
return result["text"]
|
||||
return None
|
||||
|
||||
Reference in New Issue
Block a user