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
from trafilatura import extract
import json
from get_html_from_safari.get_html_from_safari import get_html
def get_article_data(url=None):
if url is None:
html = get_html()
else:
html = get_html(url)
data_str = extract(html)
I have this test:
from nlp_extractor_simple.nlp_extractor_simple import get_article_data
def test_get_article():
get_article_data();
When running the test, I get warnings in the pytest output:
tests/test_01-basic.py::test_get_article
/usr/local/lib/python3.11/site-packages/trafilatura/core.py:560: DeprecationWarning: NotImplemented should not be used in a boolean context
result_body.extend(filter(None.__ne__, (handle_textelem(e, potential_tags, options) for e in subelems)))
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
The text was updated successfully, but these errors were encountered:
sdondley
added a commit
to sdondley/trafilatura
that referenced
this issue
Apr 9, 2023
I have this code:
I have this test:
When running the test, I get warnings in the pytest output:
The text was updated successfully, but these errors were encountered: