Skip to content

Commit

Permalink
polish
Browse files Browse the repository at this point in the history
  • Loading branch information
adbar committed Oct 22, 2024
1 parent 2e72e08 commit f93bac5
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
1 change: 1 addition & 0 deletions tests/sitemaps_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ def test_extraction():
#sitemap.handle_link(url) # (url, '0')

# safety belts
assert sitemaps.is_plausible_sitemap('http://example.org/sitemap.xml.gz', None) is False
assert sitemaps.is_plausible_sitemap('http://example.org/sitemap.xml.gz', b'\x1f\x8bABC') is False
assert sitemaps.is_plausible_sitemap('http://example.org/sitemap.xml', 'ABC') is False
assert sitemaps.is_plausible_sitemap('http://test.org/sitemap.xml', '<!DOCTYPE html><html><body/></html>') is False
Expand Down
1 change: 0 additions & 1 deletion trafilatura/feeds.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,6 @@ def find_feed_urls(
urlfilter = None
downloaded = fetch_url(url)

downloaded = fetch_url(url)
if downloaded is not None:
# assume it's a feed
feed_links = extract_links(downloaded, params)
Expand Down

0 comments on commit f93bac5

Please sign in to comment.