This commit is contained in:
Nick Sweeting
2025-12-24 21:46:14 -08:00
parent 1915333b81
commit 6c769d831c
69 changed files with 3586 additions and 4216 deletions

View File

@@ -1,10 +1,5 @@
from archivebox import util
from archivebox.misc.util import download_url
def test_download_url_downloads_content():
text = util.download_url("http://127.0.0.1:8080/static/example.com.html")
text = download_url("https://example.com")
assert "Example Domain" in text
def test_download_url_gets_encoding_from_body():
text = util.download_url("http://127.0.0.1:8080/static_no_content_type/shift_jis.html")
assert "鹿児島のニュースMBC南日本放送" in text
assert "掲載された全ての記事・画像等の無断転載、二次利用をお断りいたします" in text