Abhaykoul commited on
Commit
2480bb0
·
verified ·
1 Parent(s): a61eaba

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -18,6 +18,7 @@ def WEBScout2_search():
18
  break
19
  responses.append(r)
20
  return jsonify(responses)
 
21
  @app.route('/mws', methods=['POST'])
22
  def WEBScout_search():
23
  data = request.get_json()
@@ -28,10 +29,11 @@ def WEBScout_search():
28
  WEBS_instance = WEBS() # Instantiate WEBS without context manager
29
  responses = []
30
  for i, r in enumerate(WEBS_instance.text(query, region='wt-wt', safesearch='off', timelimit='y')):
31
- if i == 10: # Limiting the results to 10
32
  break
33
  responses.append(r)
34
  return jsonify(responses)
 
35
  @app.route('/health', methods=['GET'])
36
  def health_check():
37
  return jsonify({'status': 'ok'})
 
18
  break
19
  responses.append(r)
20
  return jsonify(responses)
21
+
22
  @app.route('/mws', methods=['POST'])
23
  def WEBScout_search():
24
  data = request.get_json()
 
29
  WEBS_instance = WEBS() # Instantiate WEBS without context manager
30
  responses = []
31
  for i, r in enumerate(WEBS_instance.text(query, region='wt-wt', safesearch='off', timelimit='y')):
32
+ if i == 2: # Limiting the results to 10
33
  break
34
  responses.append(r)
35
  return jsonify(responses)
36
+
37
  @app.route('/health', methods=['GET'])
38
  def health_check():
39
  return jsonify({'status': 'ok'})