Update tools.py
Browse files
tools.py
CHANGED
|
@@ -181,7 +181,7 @@ class audio_or_mp3__interpreter(Tool):
|
|
| 181 |
|
| 182 |
class Wikipedia_reader(Tool):
|
| 183 |
name="wiki_tool"
|
| 184 |
-
description = "To be used whenever you need to read a Wikipedia page. Will return all
|
| 185 |
inputs = {
|
| 186 |
"url": {
|
| 187 |
"type": "string",
|
|
@@ -191,12 +191,13 @@ class Wikipedia_reader(Tool):
|
|
| 191 |
output_type = "string"
|
| 192 |
|
| 193 |
def forward(self, url: str):
|
| 194 |
-
try:
|
| 195 |
-
|
| 196 |
-
except Exception as e:
|
| 197 |
-
|
| 198 |
-
soup = BeautifulSoup(page.text, 'html.parser')
|
| 199 |
-
|
|
|
|
| 200 |
|
| 201 |
class HTML_find(Tool):
|
| 202 |
name="html_tool"
|
|
|
|
| 181 |
|
| 182 |
class Wikipedia_reader(Tool):
|
| 183 |
name="wiki_tool"
|
| 184 |
+
description = "To be used whenever you need to read a Wikipedia page. Will return all wikitables, to easily read it and find information"
|
| 185 |
inputs = {
|
| 186 |
"url": {
|
| 187 |
"type": "string",
|
|
|
|
| 191 |
output_type = "string"
|
| 192 |
|
| 193 |
def forward(self, url: str):
|
| 194 |
+
#try:
|
| 195 |
+
# page = requests.get({url})
|
| 196 |
+
#except Exception as e:
|
| 197 |
+
# print('Error downloading page: ',e)
|
| 198 |
+
#soup = BeautifulSoup(page.text, 'html.parser')
|
| 199 |
+
tables=pd.read_html(url)
|
| 200 |
+
return tables
|
| 201 |
|
| 202 |
class HTML_find(Tool):
|
| 203 |
name="html_tool"
|