Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -225,7 +225,7 @@ def search_and_scrape(query, num_results=5):
|
|
| 225 |
print(f"An error occurred: {str(e)}")
|
| 226 |
return []
|
| 227 |
|
| 228 |
-
@app.route('/
|
| 229 |
def api_scrape_sites():
|
| 230 |
try:
|
| 231 |
# Get query parameters
|
|
@@ -252,9 +252,10 @@ def api_scrape_sites():
|
|
| 252 |
'success': False,
|
| 253 |
'error': str(e)
|
| 254 |
}), 500
|
|
|
|
|
|
|
|
|
|
| 255 |
|
| 256 |
-
if __name__ == "__main__":
|
| 257 |
-
app.run(debug=True, port=5000)
|
| 258 |
|
| 259 |
|
| 260 |
|
|
|
|
| 225 |
print(f"An error occurred: {str(e)}")
|
| 226 |
return []
|
| 227 |
|
| 228 |
+
@app.route('/', methods=['GET'])
|
| 229 |
def api_scrape_sites():
|
| 230 |
try:
|
| 231 |
# Get query parameters
|
|
|
|
| 252 |
'success': False,
|
| 253 |
'error': str(e)
|
| 254 |
}), 500
|
| 255 |
+
|
| 256 |
+
if __name__ == '__main__':
|
| 257 |
+
app.run(host='0.0.0.0', port=5000)
|
| 258 |
|
|
|
|
|
|
|
| 259 |
|
| 260 |
|
| 261 |
|