pypi trafilatura 2.4.0
trafilatura-2.4.0

one hour ago

Highlights:

Breaking changes:

  • jusText: try_justext() takes options instead of target_language, settings.JUSTEXT_LANGUAGES, external.jt_stoplist_init() and external.get_stoplist() removed (#1064)
  • Internals removed: utils.HTML_PARSER and xml.CONTROL_PARSER (use get_html_parser()), utils.LINES_TRIMMING, utils.safe_base_url() (use courlan.get_base_url()), JT_STOPLIST, compare_extraction() takes one tree (#1001, #1092, #1188)
  • Trees from load_html() use a single element class, without tag-specific lxml.html classes such as FormElement (#1001)
  • With tables turned off, all tables are now removed, many were left in before, pages laid out with tables can return much less text (#1001)
  • Output: no raw_text in JSON, image source in graphic/@url in TEI, XML keeps only the attributes Trafilatura sets (#1115, #1135, #1162)
  • CLI and API: --feed and --sitemap without --list only process the discovered URLs, malformed config files exit with code 2, ValueError for unknown output formats, the url argument also applies when options are passed, cli_utils.examine() takes url and options as keyword-only arguments, settings.args_to_extractor() no longer accepts url (#1070, #1122)
  • sitemap_search() and find_feed_urls() wait 5 s by default, as set in the config (#1063)

New features:

Fixes:

Maintenance:

Don't miss a new trafilatura release

NewReleases is sending notifications on new releases.