forked from bbolli/tumblr-utils
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tumblr_backup: Fix URL path logic, get_media_url and get_filename
- posixpath provides functions to split and join paths compatible with URLs, so there is no need to manually split on and insert slashes. - get_media_url would return the saved filename instead of the URL if the download fails, unlike get_image_url. Fix it to be consistent. - get_filename now applies the extension to generated filenames if it is known, and uses urlparse to make sure the filename comes only from the path part of the URL.
- Loading branch information
1 parent
73f1ba6
commit 8486347
Showing
1 changed file
with
42 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters