Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -15,10 +15,11 @@ def scrape_website(api_key, url, format_option):
|
|
15 |
try:
|
16 |
app = FirecrawlApp(api_key=api_key)
|
17 |
response = app.scrape_url(url=url, params={'formats': [format_option]})
|
18 |
-
return response
|
19 |
except Exception as e:
|
20 |
return str(e)
|
21 |
|
|
|
22 |
# Button to trigger scraping
|
23 |
if st.button("Scrape Website"):
|
24 |
if api_key and url:
|
|
|
15 |
try:
|
16 |
app = FirecrawlApp(api_key=api_key)
|
17 |
response = app.scrape_url(url=url, params={'formats': [format_option]})
|
18 |
+
return response.get('content', str(response)) # Get the content if available
|
19 |
except Exception as e:
|
20 |
return str(e)
|
21 |
|
22 |
+
|
23 |
# Button to trigger scraping
|
24 |
if st.button("Scrape Website"):
|
25 |
if api_key and url:
|