From 8f16fad1ecfbdc13e0e4bc93ba36ae496bc35e0e Mon Sep 17 00:00:00 2001 From: nielsenj Date: Sun, 29 Jun 2014 20:50:12 -0700 Subject: [PATCH 1/2] Added request headers param. --- sickbeard/tvcache.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sickbeard/tvcache.py b/sickbeard/tvcache.py index 16879349..ba6a59a7 100644 --- a/sickbeard/tvcache.py +++ b/sickbeard/tvcache.py @@ -136,9 +136,9 @@ class TVCache(): return [] - def getRSSFeed(self, url, post_data=None): + def getRSSFeed(self, url, post_data=None, request_headers=None): with RSSFeeds(self.providerID) as feed: - data = feed.getRSSFeed(url, post_data) + data = feed.getRSSFeed(url, post_data, request_headers) return data def _translateTitle(self, title): From 77ea8117c608dc21879ece39d94b6fcecc71c8eb Mon Sep 17 00:00:00 2001 From: nielsenj Date: Sun, 29 Jun 2014 20:52:11 -0700 Subject: [PATCH 2/2] Added request headers param. A recent update/change in RSS cache removed the cookies for custom RSS provider. This re-adds it. --- sickbeard/rssfeeds.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sickbeard/rssfeeds.py b/sickbeard/rssfeeds.py index 71c2623c..d843c551 100644 --- a/sickbeard/rssfeeds.py +++ b/sickbeard/rssfeeds.py @@ -36,7 +36,7 @@ class RSSFeeds: self.fc.purge(age) - def getRSSFeed(self, url, post_data=None): + def getRSSFeed(self, url, post_data=None, request_headers=None): if not self.fc: return @@ -47,7 +47,7 @@ class RSSFeeds: if post_data: url += urllib.urlencode(post_data) - feed = self.fc.fetch(url) + feed = self.fc.fetch(url, False, False, request_headers) if not feed: logger.log(u"RSS Error loading URL: " + url, logger.ERROR) return @@ -59,4 +59,4 @@ class RSSFeeds: logger.log(u"No RSS items found using URL: " + url, logger.WARNING) return - return feed \ No newline at end of file + return feed