tumblr / pytumblr

A Python Tumblr API v2 Client
Apache License 2.0
723 stars 196 forks source link

UUIDs are not supported #124

Open ievans3024 opened 5 years ago

ievans3024 commented 5 years ago

Tumblr's API allows you to use a UUID (e.g., t:0aY0xL2Fi1OFJg4YxpmegQ) instead of a blog url (in the case of the aforementioned UUID, staff.tumblr.com.) Programmatically, this is a much more useful identifier to go by, as it's persistent regardless of whether the blogname changes.

The problem is in add_dot_tumblr in helpers, which assumes that the identifier being passed is always a .tumblr.com url unless it otherwise looks like a url.

Tumblr's UUIDs always start with t:, so the simple fix is to check for that before adding .tumblr.com