Imgur recently changed their website so that the direct links would redirect to the main website unless the Referer header was set to https://imgur.com/
This PR adds that header if the URL contains imgur and also prevents a duplicate .png extension being added to direct links (this didn't appear to break anything, it just bugged me when I was logging the URL)
Imgur recently changed their website so that the direct links would redirect to the main website unless the
Referer
header was set tohttps://imgur.com/
This PR adds that header if the URL contains
imgur
and also prevents a duplicate.png
extension being added to direct links (this didn't appear to break anything, it just bugged me when I was logging the URL)