Spaces:
Sleeping
Sleeping
Update main.py
Browse files
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 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
|
|
|
|
|
|
|
|
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 |
|