Skip to content

Commit

Permalink
minor bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
theblackcat102 committed Apr 27, 2022
1 parent ad7bed0 commit 7ad5ff2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion extractnet/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from extractnet.pipeline import Extractor

__version__ = '2.0.3'
__version__ = '2.0.4'


_LOADED_MODELS = {}
Expand Down
2 changes: 1 addition & 1 deletion extractnet/metadata_extraction/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def extract_json(tree, metadata):
if '"publisher"' in elem.text:
mymatch = JSON_PUBLISHER.search(elem.text)
if mymatch and not ',' in mymatch.group(1):
candidate = normalize_json(mymatch.group(1))
candidate = url_normalizer(mymatch.group(1))
if metadata['sitename'] is None or len(metadata['sitename']) < len(candidate):
metadata['sitename'] = candidate
if metadata['sitename'].startswith('http') and not candidate.startswith('http'):
Expand Down

0 comments on commit 7ad5ff2

Please sign in to comment.