mrkipling/maraschino — pull request #320 by taeram (2013-09-12 15:23:32+00:00)
Title: Fix CloudFlare 1010 error in TraktPlus module

The Trakt Plus module has recently begun returning "broken" thumbnails for all shows and movies. Looking at the contents of the actual .jpg files in the cache/trakt/shows/ and cache/trakt/movies/ directories, they're full of HTML.

The HTML was generated by CloudFlare, and is an [Access Denied: Error 1010](https://support.cloudflare.com/hc/en-us/articles/200171806-Access-Denied-The-owner-of-this-website-has-banned-your-access-based-on-your-browser-s-signature) error.

This PR fixes the CloudFlare 1010 error by faking a User-Agent header when making the request for thumbnail images from Trakt.tv. I've switched to urllib2 for downloading the thumbnail images, as urllib doesn't support headers (as far as I can tell).