Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace md5 with hash in cached_download function for any hash algorithm #311

Conversation

wkentaro
Copy link
Owner

@wkentaro wkentaro commented Feb 1, 2024

  • Will support md5, sha1, sha256, ...

Usage:

# Old
gdown.cached_download(
    url=url,
    md5="xxxx...xxxx",
)

# New
gdown.cached_download(
    url=url,
    hash="md5:xxxx....xxxx",
)
gdown.cached_download(
    url=url,
    hash="sha1:xxxx....xxxx",
)
gdown.cached_download(
    url=url,
    hash="sha256:xxxx....xxxx",
)

@wkentaro wkentaro self-assigned this Feb 1, 2024
@wkentaro wkentaro added the feature for pr label Feb 1, 2024
@wkentaro wkentaro force-pushed the replace_md5_with_hash_in_cached_download_function_for_any_hash_algorithm branch 3 times, most recently from 9d85a7e to 9c6e119 Compare February 1, 2024 14:06
@wkentaro wkentaro force-pushed the replace_md5_with_hash_in_cached_download_function_for_any_hash_algorithm branch 2 times, most recently from 2f11901 to fb404fb Compare February 1, 2024 14:10
@wkentaro wkentaro force-pushed the replace_md5_with_hash_in_cached_download_function_for_any_hash_algorithm branch from fb404fb to ac8c7fa Compare February 1, 2024 14:11
@wkentaro wkentaro merged commit cfb4021 into main Feb 1, 2024
2 checks passed
@wkentaro wkentaro deleted the replace_md5_with_hash_in_cached_download_function_for_any_hash_algorithm branch February 1, 2024 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature for pr
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant