You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Traceback (most recent call last):
File "/Users/zyq/CC_Cat/test.py", line 5, in <module>
print(trafilatura.extract(resp))
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/zyq/miniconda3/envs/3.12.0/lib/python3.12/site-packages/trafilatura/core.py", line 338, in extract
document = bare_extraction(
^^^^^^^^^^^^^^^^
File "/Users/zyq/miniconda3/envs/3.12.0/lib/python3.12/site-packages/trafilatura/core.py", line 206, in bare_extraction
postbody, temp_text, len_text = baseline(deepcopy(tree_backup))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/zyq/miniconda3/envs/3.12.0/lib/python3.12/site-packages/trafilatura/baseline.py", line 49, in baseline
text = trim(load_html(json_body).text_content()) if "<p>" in json_body else trim(json_body)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'text_content'
The text was updated successfully, but these errors were encountered:
adbar
changed the title
load_html return None leads error
AttributeError in baseline extraction of JSON text
Jul 16, 2024
python
:3.12.0
trafilatura
:1.11.0
The text was updated successfully, but these errors were encountered: