Skip to content

Commit 962de78

Browse files
authored
fix: remove response text when the HTML status code is an error (#213)
* release: version 0.4.7 * remove response text from url error
1 parent f890972 commit 962de78

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## 0.4.7-dev4
1+
## 0.4.7
22

33
* Added the ability to pull an HTML document from a url in `partition_html`.
44
* Added the the ability to get file summary info from lists of filenames and lists

unstructured/__version__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "0.4.7-dev4" # pragma: no cover
1+
__version__ = "0.4.7" # pragma: no cover

unstructured/partition/html.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def partition_html(
5151
elif url is not None and not filename and not file and not text:
5252
response = requests.get(url)
5353
if not response.ok:
54-
raise ValueError(f"URL return an error: {response.status_code} {response.text}")
54+
raise ValueError(f"URL return an error: {response.status_code}")
5555

5656
content_type = response.headers.get("Content-Type", "")
5757
if not content_type.startswith("text/html"):

0 commit comments

Comments
 (0)