VishnuPottabatthini commited on
Commit
fa2ac22
·
verified ·
1 Parent(s): 247bd54

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -1
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
- return f"Title: {title}\n\nContent:\n{content}"
 
 
 
 
 
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