Skip to content

Commit

Permalink
update htmldate version and tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tonyyanga committed Nov 26, 2023
1 parent 0289a0f commit 0a91583
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def get_long_description():
"brotli",
"cchardet >= 2.1.7; python_version < '3.11'", # build issue
"faust-cchardet >= 2.1.18; python_version >= '3.11'", # fix for build
"htmldate[speed] >= 1.5.1",
"htmldate[speed] >= 1.6.0",
"py3langid >= 0.2.2",
"pycurl >= 7.45.2",
],
Expand Down Expand Up @@ -112,7 +112,7 @@ def get_long_description():
"charset_normalizer >= 3.0.1; python_version < '3.7'",
"charset_normalizer >= 3.2.0; python_version >= '3.7'",
"courlan >= 0.9.4",
"htmldate >= 1.5.1",
"htmldate >= 1.6.0",
"justext >= 3.0.0",
"lxml >= 4.9.3 ; platform_system != 'Darwin'",
"lxml == 4.9.2 ; platform_system == 'Darwin'",
Expand Down
3 changes: 2 additions & 1 deletion tests/metadata_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,9 @@ def test_dates():
mystring = '<html><body><p>Veröffentlicht am 1.9.17</p></body></html>'
metadata = extract_metadata(mystring, fastmode=False)
assert metadata.date == '2017-09-01'
# behavior for fastmode=True changed in htmldate==1.6.0. On 1.5.2 and earlier, result was None
metadata = extract_metadata(mystring, fastmode=True)
assert metadata.date is None
assert metadata.date is '2017-09-01'


def test_sitename():
Expand Down

0 comments on commit 0a91583

Please sign in to comment.