Closed mattieb closed 6 years ago
I don’t know. Do we really want to circumvent this block? I feel like this might be uncool...
Maybe the right thing to do is to invent a user agent that isn’t python-urllib and communicate it with server admins so they can block it if they desire.
This tool is pretty narrowly wired specifically for the backup use case and is careful not to re-request media it already has. I don’t think most admins would be opposed to it in theory, but I do see the value in being honest about what user agent we actually are.
Yeah, naming the tool as the user agent would make sense to me.
Hey, sorry, I got a little busy, did you decide you didn't want that User-Agent changed?
I merged your commit and in commit a2e19be I changed the UA as discussed to something specific to the application.
mastodon.social's media infrastructure rejects the
urllib
user agent. This changes the user agent to the generic string "Mozilla", which makes media downloads work on mastodon.social.