Spaces:
Running
Running
fixing decode issue
Browse files
mediaunmasked/services/analyzer_service.py
CHANGED
@@ -22,10 +22,12 @@ class AnalyzerService:
|
|
22 |
Analyze an article for bias, sentiment, and credibility.
|
23 |
"""
|
24 |
try:
|
25 |
-
|
|
|
|
|
26 |
|
27 |
# Scrape article (now synchronous)
|
28 |
-
article = scraper.scrape_article(
|
29 |
if not article:
|
30 |
raise HTTPException(
|
31 |
status_code=400,
|
|
|
22 |
Analyze an article for bias, sentiment, and credibility.
|
23 |
"""
|
24 |
try:
|
25 |
+
# Convert URL to string explicitly
|
26 |
+
url_str = str(request.url)
|
27 |
+
logger.info(f"Analyzing article: {url_str}")
|
28 |
|
29 |
# Scrape article (now synchronous)
|
30 |
+
article = scraper.scrape_article(url_str)
|
31 |
if not article:
|
32 |
raise HTTPException(
|
33 |
status_code=400,
|