Arafath10 commited on
Commit
5722adc
1 Parent(s): 0af1f84

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +8 -4
main.py CHANGED
@@ -59,10 +59,14 @@ async def get_n_depth_results(url,input_query):
59
  params = {'url': input_url}
60
  headers = {'accept': 'application/json'}
61
  url = 'https://chromium-qpxamiokfa-uc.a.run.app/get_scraped_data'
62
- response = requests.get(url, headers=headers, params=params)
63
- all_url = response.json()["URL"]
64
- all_content[input_url] = response.json()["Content"]
65
- return all_url
 
 
 
 
66
 
67
  pdf_urls = []
68
 
 
59
  params = {'url': input_url}
60
  headers = {'accept': 'application/json'}
61
  url = 'https://chromium-qpxamiokfa-uc.a.run.app/get_scraped_data'
62
+ try:
63
+ response = requests.get(url, headers=headers, params=params)
64
+ all_url = response.json()["URL"]
65
+ all_content[input_url] = response.json()["Content"]
66
+ return all_url
67
+ except:
68
+ print(f"found a error url : {input_url}=========================================")
69
+ return "none"
70
 
71
  pdf_urls = []
72