Skip to content

Commit

Permalink
simplify syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
adbar committed Oct 24, 2023
1 parent a324216 commit a0bfa54
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions trafilatura/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -914,9 +914,10 @@ def bare_extraction(filecontent, url=None, no_fallback=False, # fast=False,
# extract metadata if necessary
if output_format != 'txt':

extensive_htmldate = config.getboolean('DEFAULT', 'EXTENSIVE_DATE_SEARCH')
if not date_extraction_params and not extensive_htmldate:
date_extraction_params = {"extensive_search": False}
if not date_extraction_params:
date_extraction_params = {
"extensive_search": config.getboolean('DEFAULT', 'EXTENSIVE_DATE_SEARCH'),
}

document = extract_metadata(tree, url, date_extraction_params, no_fallback, author_blacklist)

Expand Down

0 comments on commit a0bfa54

Please sign in to comment.