catch exception from scrapper

This commit is contained in:
Maciej Ścigacz 2023-05-31 18:13:34 +02:00
parent 51d691f08c
commit c177c22c7a

View File

@ -28,9 +28,5 @@ def scrapp():
result = scrapp_comments(url['link']) result = scrapp_comments(url['link'])
result['status'] = True result['status'] = True
return result return result
except: except Exception as err:
return jsonify({'status':False}) return jsonify({'status':False, 'error':err})
@sentiment_service.route("/hello", methods=['GET'])
def elo():
return "helo world"