Add user-agent to newznab request

Fixes #2611

Note that urlib2.urlopen should just follow redirects so I dont
understand why we need 3b519aeac9
This commit is contained in:
mano3m
2013-12-27 20:11:27 +01:00
parent 1cea50bcfb
commit be0b708d32
@@ -163,6 +163,7 @@ class Newznab(NZBProvider, RSS):
# Get final redirected url
log.debug('Checking %s for redirects.', url)
req = urllib2.Request(url)
req.add_header('User-Agent', self.user_agent)
res = urllib2.urlopen(req)
finalurl = res.geturl()
if finalurl != url: