Update app.py
Browse files
app.py
CHANGED
@@ -18,7 +18,12 @@ def scrape_article(url):
|
|
18 |
if not content:
|
19 |
return "Failed to scrape content. Please check the URL."
|
20 |
|
21 |
-
|
|
|
|
|
|
|
|
|
|
|
22 |
except Exception as e:
|
23 |
return f"Error: {str(e)}"
|
24 |
|
|
|
18 |
if not content:
|
19 |
return "Failed to scrape content. Please check the URL."
|
20 |
|
21 |
+
|
22 |
+
return jsonify({
|
23 |
+
"title": title,
|
24 |
+
"content": content
|
25 |
+
}), 200
|
26 |
+
# return f"Title: {title}\n\nContent:\n{content}"
|
27 |
except Exception as e:
|
28 |
return f"Error: {str(e)}"
|
29 |
|