Spaces:
Sleeping
Sleeping
meirk-brd commited on
Commit ·
1cbc47e
1
Parent(s): dc8b2a7
check origin name
Browse files
tool.py
CHANGED
|
@@ -230,14 +230,8 @@ class BrightDataDatasetTool(Tool):
|
|
| 230 |
return url_from_file
|
| 231 |
|
| 232 |
orig_name = raw.get("orig_name")
|
| 233 |
-
if (
|
| 234 |
-
|
| 235 |
-
and orig_name
|
| 236 |
-
and (orig_name.startswith(("http://", "https://")) or "." in orig_name)
|
| 237 |
-
):
|
| 238 |
-
extracted = self._extract_url_from_text(orig_name)
|
| 239 |
-
if extracted:
|
| 240 |
-
return extracted
|
| 241 |
|
| 242 |
url_value = raw.get("url")
|
| 243 |
if isinstance(url_value, str):
|
|
|
|
| 230 |
return url_from_file
|
| 231 |
|
| 232 |
orig_name = raw.get("orig_name")
|
| 233 |
+
if isinstance(orig_name, str) and orig_name:
|
| 234 |
+
return self._ensure_scheme(orig_name)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 235 |
|
| 236 |
url_value = raw.get("url")
|
| 237 |
if isinstance(url_value, str):
|