From 0f789b5b40990db7edfcff73fae3118423127c0e Mon Sep 17 00:00:00 2001 From: Ruud Date: Sat, 19 Jan 2013 01:17:57 +0100 Subject: [PATCH] NZBsRus rss different item path. fix #1301 --- couchpotato/core/providers/base.py | 4 ++-- couchpotato/core/providers/nzb/nzbsrus/main.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/couchpotato/core/providers/base.py b/couchpotato/core/providers/base.py index a07282af..12d77740 100644 --- a/couchpotato/core/providers/base.py +++ b/couchpotato/core/providers/base.py @@ -56,14 +56,14 @@ class Provider(Plugin): return [] - def getRSSData(self, url, **kwargs): + def getRSSData(self, url, item_path = 'channel/item', **kwargs): data = self.getCache(md5(url), url, **kwargs) if data: try: data = XMLTree.fromstring(data) - return self.getElements(data, 'channel/item') + return self.getElements(data, item_path) except: log.error('Failed to parsing %s: %s', (self.getName(), traceback.format_exc())) diff --git a/couchpotato/core/providers/nzb/nzbsrus/main.py b/couchpotato/core/providers/nzb/nzbsrus/main.py index 9a20153b..f6a16aaa 100644 --- a/couchpotato/core/providers/nzb/nzbsrus/main.py +++ b/couchpotato/core/providers/nzb/nzbsrus/main.py @@ -37,7 +37,7 @@ class Nzbsrus(NZBProvider, RSS): arguments += '&lang0=1&lang3=1&lang1=1' url = '%s&%s&%s' % (self.urls['search'], arguments , cat_id_string) - nzbs = self.getRSSData(url, cache_timeout = 1800, headers = {'User-Agent': Env.getIdentifier()}) + nzbs = self.getRSSData(url, item_path = 'results/result', cache_timeout = 1800, headers = {'User-Agent': Env.getIdentifier()}) for nzb in nzbs: