Spaces:
Sleeping
Sleeping
certifi
Browse files- requirements.txt +1 -0
- tools.py +3 -2
requirements.txt
CHANGED
|
@@ -9,3 +9,4 @@ langchain_community
|
|
| 9 |
langchain-openai
|
| 10 |
langchain-anthropic
|
| 11 |
langgraph
|
|
|
|
|
|
| 9 |
langchain-openai
|
| 10 |
langchain-anthropic
|
| 11 |
langgraph
|
| 12 |
+
certifi
|
tools.py
CHANGED
|
@@ -1,6 +1,7 @@
|
|
| 1 |
import os
|
| 2 |
import base64
|
| 3 |
import urllib3
|
|
|
|
| 4 |
import requests
|
| 5 |
import tempfile
|
| 6 |
import pandas as pd
|
|
@@ -265,7 +266,7 @@ def _fetch_ddg_search_result_links(query: str) -> ResultSet[PageElement | Tag |
|
|
| 265 |
'kl': 'us-en'
|
| 266 |
}
|
| 267 |
|
| 268 |
-
ddg_response = requests.get(url, headers=headers, params=params)
|
| 269 |
ddg_response.raise_for_status()
|
| 270 |
|
| 271 |
soup = BeautifulSoup(ddg_response.text, 'html.parser')
|
|
@@ -279,7 +280,7 @@ def _fetch_specific_page(url: str) -> str:
|
|
| 279 |
'Accept-Language': 'en-US,en;q=0.5',
|
| 280 |
}
|
| 281 |
|
| 282 |
-
wiki_response = requests.get(url, headers=headers)
|
| 283 |
wiki_response.raise_for_status()
|
| 284 |
|
| 285 |
soup = BeautifulSoup(wiki_response.text, 'html.parser')
|
|
|
|
| 1 |
import os
|
| 2 |
import base64
|
| 3 |
import urllib3
|
| 4 |
+
import certifi
|
| 5 |
import requests
|
| 6 |
import tempfile
|
| 7 |
import pandas as pd
|
|
|
|
| 266 |
'kl': 'us-en'
|
| 267 |
}
|
| 268 |
|
| 269 |
+
ddg_response = requests.get(url, headers=headers, params=params, verify=certifi.where())
|
| 270 |
ddg_response.raise_for_status()
|
| 271 |
|
| 272 |
soup = BeautifulSoup(ddg_response.text, 'html.parser')
|
|
|
|
| 280 |
'Accept-Language': 'en-US,en;q=0.5',
|
| 281 |
}
|
| 282 |
|
| 283 |
+
wiki_response = requests.get(url, headers=headers, verify=certifi.where())
|
| 284 |
wiki_response.raise_for_status()
|
| 285 |
|
| 286 |
soup = BeautifulSoup(wiki_response.text, 'html.parser')
|