Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
adbar committed Aug 3, 2023
1 parent d02f9c8 commit 7077420
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def get_long_description():
"certifi",
"charset_normalizer >= 3.0.1; python_version < '3.7'",
"charset_normalizer >= 3.1.0; python_version >= '3.7'",
"courlan @ git+https://github.com/adbar/courlan@compatibility",
"courlan @ git+https://github.com/adbar/courlan",
"htmldate >= 1.4.3",
"justext >= 3.0.0",
"lxml >= 4.9.3 ; platform_system != 'Darwin'",
Expand Down
4 changes: 2 additions & 2 deletions tests/feeds_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def test_atom_extraction():
'example.org',
'http://example.org/',
'http://example.org',
) == ['http://example.org/article1']
) == ['http://example.org/article1/'] # TODO: remove slash?


def test_rss_extraction():
Expand All @@ -87,7 +87,7 @@ def test_rss_extraction():
'example.org',
'http://example.org/',
'',
) == ['http://example.org/article1']
) == ['http://example.org/article1/'] # TODO: remove slash?
# spaces
assert len(feeds.extract_links(XMLDECL + '<link>\r\n https://www.ak-kurier.de/akkurier/www/artikel/108815-sinfonisches-blasorchester-spielt-1500-euro-fuer-kinder-in-drk-krankenhaus-kirchen-ein </link>', 'ak-kurier.de', 'https://www.ak-kurier.de/', '')) == 1
assert (
Expand Down
1 change: 0 additions & 1 deletion tests/sitemaps_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,6 @@ def test_robotstxt():
def test_whole():
"Test whole process."
results = sitemaps.sitemap_search("https://www.sitemaps.org", target_lang="de")
print(results)
assert len(results) == 8


Expand Down
2 changes: 1 addition & 1 deletion tests/spider_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def test_process_links():
spider.process_links(htmlstring, base_url, language='en')
todo = spider.URL_STORE.find_unvisited_urls(base_url)
known_links = spider.URL_STORE.find_known_urls(base_url)
assert 'https://example.org/en/page1' in todo and len(known_links) == 4
assert 'https://example.org/en/page1/' in todo and len(known_links) == 4 # TODO: remove slash?
# wrong language
htmlstring = '<html><body><a href="https://example.org/en/page2"/></body></html>'
spider.process_links(htmlstring, base_url, language='de')
Expand Down

0 comments on commit 7077420

Please sign in to comment.