We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Cookie required when configuring custom provider

Branch: master
Commit: 3f23fd272652b10cf781e3058fee50daf79f11b6Version: v0.1.15
Database: 44.8
Python Version: | 2.7.13 (default, Dec 18 2016, 22:44:40) [GCC 4.9.3 20150311 (prerelease)]
SSL Version: | OpenSSL 1.0.2j 26 Sep 2016
OS: | Linux-3.10.102-armv7l-with-glibc2.4
Locale: | en_US.UTF-8

Trying to add custom provider, EZTV.  I don't use a login, just linking to the RSS feed.  When I try to add the site, it's requiring a cookie, something I don't recall having to do w/SR.   When I put all of the details in except the cookie and hit add, I get an error box stating "No Cookies added from ui for provider: EZTV".  Shouldn't this be optional or has something changed requiring cookies to be set?

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `medusa/providers/torrent/rss/rsstorrent.py`
Content:
```
1 # coding=utf-8
2 
3 """Provider code for RSS Torrents."""
4 
5 from __future__ import unicode_literals
6 
7 import io
8 import logging
9 import os
10 import re
11 
12 from bencode import bdecode
13 
14 from medusa import (
15     app,
16     helpers,
17     tv,
18 )
19 from medusa.helper.exceptions import ex
20 from medusa.providers.torrent.torrent_provider import TorrentProvider
21 
22 log = logging.getLogger(__name__)
23 log.logger.addHandler(logging.NullHandler())
24 
25 
26 class TorrentRssProvider(TorrentProvider):
27     """Torrent RSS provider."""
28 
29     def __init__(self, name, url, cookies='',
30                  title_tag='title', search_mode='eponly', search_fallback=False,
31                  enable_daily=False, enable_backlog=False, enable_manualsearch=False):
32         """Initialize the class."""
33         super(TorrentRssProvider, self).__init__(name)
34 
35         # Credentials
36 
37         # URLs
38         self.url = url.rstrip('/')
39 
40         # Proper Strings
41 
42         # Miscellaneous Options
43         self.supports_backlog = False
44         self.search_mode = search_mode
45         self.search_fallback = search_fallback
46         self.enable_daily = enable_daily
47         self.enable_manualsearch = enable_manualsearch
48         self.enable_backlog = enable_backlog
49         self.enable_cookies = True
50         self.cookies = cookies
51         self.title_tag = title_tag
52 
53         # Torrent Stats
54 
55         # Cache
56         self.cache = TorrentRssCache(self, min_time=15)
57 
58     def _get_title_and_url(self, item):
59         """Get title and url from result."""
60         title = item.get(self.title_tag, '').replace(' ', '.')
61 
62         attempt_list = [
63             lambda: item.get('torrent_magneturi'),
64             lambda: item.enclosures[0].href,
65             lambda: item.get('link')
66         ]
67 
68         url = None
69         for cur_attempt in attempt_list:
70             try:
71                 url = cur_attempt()
72             except Exception:
73                 continue
74 
75             if title and url:
76                 break
77 
78         return title, url
79 
80     def config_string(self):
81         """Return default RSS torrent provider config setting."""
82         return '{}|{}|{}|{}|{}|{}|{}|{}|{}|{}'.format(
83             self.name or '',
84             self.url or '',
85             self.cookies or '',
86             self.title_tag or '',
87             int(self.enabled),
88             self.search_mode or '',
89             int(self.search_fallback),
90             int(self.enable_daily),
91             int(self.enable_manualsearch),
92             int(self.enable_backlog)
93         )
94 
95     @staticmethod
96     def get_providers_list(data):
97         """Get RSS torrent provider list."""
98         providers_list = [x for x in (TorrentRssProvider._make_provider(x) for x in data.split('!!!')) if x]
99         seen_values = set()
100         providers_set = []
101 
102         for provider in providers_list:
103             value = provider.name
104 
105             if value not in seen_values:
106                 providers_set.append(provider)
107                 seen_values.add(value)
108 
109         return [x for x in providers_set if x]
110 
111     def image_name(self):
112         """Return RSS torrent image."""
113         if os.path.isfile(os.path.join(app.PROG_DIR, 'static/images/providers/', self.get_id() + '.png')):
114             return self.get_id() + '.png'
115         return 'torrentrss.png'
116 
117     @staticmethod
118     def _make_provider(config):
119         """Create new RSS provider."""
120         if not config:
121             return None
122 
123         cookies = ''
124         enable_backlog = 0
125         enable_daily = 0
126         enable_manualsearch = 0
127         search_fallback = 0
128         search_mode = 'eponly'
129         title_tag = 'title'
130 
131         try:
132             values = config.split('|')
133 
134             if len(values) == 9:
135                 name, url, cookies, title_tag, enabled, search_mode, search_fallback, enable_daily, enable_backlog = values
136             elif len(values) == 10:
137                 name, url, cookies, title_tag, enabled, search_mode, search_fallback, enable_daily, enable_backlog, enable_manualsearch = values
138             elif len(values) == 8:
139                 name, url, cookies, enabled, search_mode, search_fallback, enable_daily, enable_backlog = values
140             else:
141                 enabled = values[4]
142                 name = values[0]
143                 url = values[1]
144         except ValueError:
145             log.error('Skipping RSS Torrent provider string: {0}, incorrect format', config)
146             return None
147 
148         new_provider = TorrentRssProvider(
149             name, url, cookies=cookies, title_tag=title_tag, search_mode=search_mode, search_fallback=search_fallback,
150             enable_daily=enable_daily, enable_backlog=enable_backlog, enable_manualsearch=enable_manualsearch
151         )
152         new_provider.enabled = enabled == '1'
153 
154         return new_provider
155 
156     def validate_rss(self):
157         """Validate if RSS."""
158         try:
159             add_cookie = self.add_cookies_from_ui()
160             if not add_cookie.get('result'):
161                 return add_cookie
162 
163             data = self.cache._get_rss_data()['entries']
164             if not data:
165                 return {'result': False,
166                         'message': 'No items found in the RSS feed {0}'.format(self.url)}
167 
168             title, url = self._get_title_and_url(data[0])
169 
170             if not title:
171                 return {'result': False,
172                         'message': 'Unable to get title from first item'}
173 
174             if not url:
175                 return {'result': False,
176                         'message': 'Unable to get torrent url from first item'}
177 
178             if url.startswith('magnet:') and re.search(r'urn:btih:([\w]{32,40})', url):
179                 return {'result': True,
180                         'message': 'RSS feed Parsed correctly'}
181             else:
182                 torrent_file = self.session.get_content(url)
183                 try:
184                     bdecode(torrent_file)
185                 except Exception as error:
186                     self.dump_html(torrent_file)
187                     return {'result': False,
188                             'message': 'Torrent link is not a valid torrent file: {0}'.format(ex(error))}
189 
190             return {'result': True, 'message': 'RSS feed Parsed correctly'}
191 
192         except Exception as error:
193             return {'result': False, 'message': 'Error when trying to load RSS: {0}'.format(ex(error))}
194 
195     @staticmethod
196     def dump_html(data):
197         """Dump html data."""
198         dump_name = os.path.join(app.CACHE_DIR, 'custom_torrent.html')
199 
200         try:
201             file_out = io.open(dump_name, 'wb')
202             file_out.write(data)
203             file_out.close()
204             helpers.chmod_as_parent(dump_name)
205         except IOError as error:
206             log.error('Unable to save the file: {0}', error)
207             return False
208 
209         log.info('Saved custom_torrent html dump {0} ', dump_name)
210         return True
211 
212 
213 class TorrentRssCache(tv.Cache):
214     """RSS torrent cache class."""
215 
216     def _get_rss_data(self):
217         """Get RSS data."""
218         return self.get_rss_feed(self.provider.url)
219
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/medusa/providers/torrent/rss/rsstorrent.py b/medusa/providers/torrent/rss/rsstorrent.py
--- a/medusa/providers/torrent/rss/rsstorrent.py
+++ b/medusa/providers/torrent/rss/rsstorrent.py
@@ -46,8 +46,9 @@
         self.enable_daily = enable_daily
         self.enable_manualsearch = enable_manualsearch
         self.enable_backlog = enable_backlog
-        self.enable_cookies = True
+        self.enable_cookies = bool(cookies)
         self.cookies = cookies
+        self.required_cookies = ('uid', 'pass')
         self.title_tag = title_tag
 
         # Torrent Stats
@@ -156,9 +157,10 @@
     def validate_rss(self):
         """Validate if RSS."""
         try:
-            add_cookie = self.add_cookies_from_ui()
-            if not add_cookie.get('result'):
-                return add_cookie
+            if self.enable_cookies:
+                add_cookie = self.add_cookies_from_ui()
+                if not add_cookie.get('result'):
+                    return add_cookie
 
             data = self.cache._get_rss_data()['entries']
             if not data:

{"golden_diff": "diff --git a/medusa/providers/torrent/rss/rsstorrent.py b/medusa/providers/torrent/rss/rsstorrent.py\n--- a/medusa/providers/torrent/rss/rsstorrent.py\n+++ b/medusa/providers/torrent/rss/rsstorrent.py\n@@ -46,8 +46,9 @@\n         self.enable_daily = enable_daily\n         self.enable_manualsearch = enable_manualsearch\n         self.enable_backlog = enable_backlog\n-        self.enable_cookies = True\n+        self.enable_cookies = bool(cookies)\n         self.cookies = cookies\n+        self.required_cookies = ('uid', 'pass')\n         self.title_tag = title_tag\n \n         # Torrent Stats\n@@ -156,9 +157,10 @@\n     def validate_rss(self):\n         \"\"\"Validate if RSS.\"\"\"\n         try:\n-            add_cookie = self.add_cookies_from_ui()\n-            if not add_cookie.get('result'):\n-                return add_cookie\n+            if self.enable_cookies:\n+                add_cookie = self.add_cookies_from_ui()\n+                if not add_cookie.get('result'):\n+                    return add_cookie\n \n             data = self.cache._get_rss_data()['entries']\n             if not data:\n", "issue": "Cookie required when configuring custom provider\n\r\nBranch:\u00a0master\r\nCommit:\u00a03f23fd272652b10cf781e3058fee50daf79f11b6Version:\u00a0v0.1.15\r\nDatabase: 44.8\r\nPython Version: | 2.7.13 (default, Dec 18 2016, 22:44:40) [GCC 4.9.3 20150311 (prerelease)]\r\nSSL Version: | OpenSSL 1.0.2j 26 Sep 2016\r\nOS: | Linux-3.10.102-armv7l-with-glibc2.4\r\nLocale: | en_US.UTF-8\r\n\r\nTrying to add custom provider, EZTV.  I don't use a login, just linking to the RSS feed.  When I try to add the site, it's requiring a cookie, something I don't recall having to do w/SR.   When I put all of the details in except the cookie and hit add, I get an error box stating \"No Cookies added from ui for provider: EZTV\".  Shouldn't this be optional or has something changed requiring cookies to be set?\n", "before_files": [{"content": "# coding=utf-8\n\n\"\"\"Provider code for RSS Torrents.\"\"\"\n\nfrom __future__ import unicode_literals\n\nimport io\nimport logging\nimport os\nimport re\n\nfrom bencode import bdecode\n\nfrom medusa import (\n    app,\n    helpers,\n    tv,\n)\nfrom medusa.helper.exceptions import ex\nfrom medusa.providers.torrent.torrent_provider import TorrentProvider\n\nlog = logging.getLogger(__name__)\nlog.logger.addHandler(logging.NullHandler())\n\n\nclass TorrentRssProvider(TorrentProvider):\n    \"\"\"Torrent RSS provider.\"\"\"\n\n    def __init__(self, name, url, cookies='',\n                 title_tag='title', search_mode='eponly', search_fallback=False,\n                 enable_daily=False, enable_backlog=False, enable_manualsearch=False):\n        \"\"\"Initialize the class.\"\"\"\n        super(TorrentRssProvider, self).__init__(name)\n\n        # Credentials\n\n        # URLs\n        self.url = url.rstrip('/')\n\n        # Proper Strings\n\n        # Miscellaneous Options\n        self.supports_backlog = False\n        self.search_mode = search_mode\n        self.search_fallback = search_fallback\n        self.enable_daily = enable_daily\n        self.enable_manualsearch = enable_manualsearch\n        self.enable_backlog = enable_backlog\n        self.enable_cookies = True\n        self.cookies = cookies\n        self.title_tag = title_tag\n\n        # Torrent Stats\n\n        # Cache\n        self.cache = TorrentRssCache(self, min_time=15)\n\n    def _get_title_and_url(self, item):\n        \"\"\"Get title and url from result.\"\"\"\n        title = item.get(self.title_tag, '').replace(' ', '.')\n\n        attempt_list = [\n            lambda: item.get('torrent_magneturi'),\n            lambda: item.enclosures[0].href,\n            lambda: item.get('link')\n        ]\n\n        url = None\n        for cur_attempt in attempt_list:\n            try:\n                url = cur_attempt()\n            except Exception:\n                continue\n\n            if title and url:\n                break\n\n        return title, url\n\n    def config_string(self):\n        \"\"\"Return default RSS torrent provider config setting.\"\"\"\n        return '{}|{}|{}|{}|{}|{}|{}|{}|{}|{}'.format(\n            self.name or '',\n            self.url or '',\n            self.cookies or '',\n            self.title_tag or '',\n            int(self.enabled),\n            self.search_mode or '',\n            int(self.search_fallback),\n            int(self.enable_daily),\n            int(self.enable_manualsearch),\n            int(self.enable_backlog)\n        )\n\n    @staticmethod\n    def get_providers_list(data):\n        \"\"\"Get RSS torrent provider list.\"\"\"\n        providers_list = [x for x in (TorrentRssProvider._make_provider(x) for x in data.split('!!!')) if x]\n        seen_values = set()\n        providers_set = []\n\n        for provider in providers_list:\n            value = provider.name\n\n            if value not in seen_values:\n                providers_set.append(provider)\n                seen_values.add(value)\n\n        return [x for x in providers_set if x]\n\n    def image_name(self):\n        \"\"\"Return RSS torrent image.\"\"\"\n        if os.path.isfile(os.path.join(app.PROG_DIR, 'static/images/providers/', self.get_id() + '.png')):\n            return self.get_id() + '.png'\n        return 'torrentrss.png'\n\n    @staticmethod\n    def _make_provider(config):\n        \"\"\"Create new RSS provider.\"\"\"\n        if not config:\n            return None\n\n        cookies = ''\n        enable_backlog = 0\n        enable_daily = 0\n        enable_manualsearch = 0\n        search_fallback = 0\n        search_mode = 'eponly'\n        title_tag = 'title'\n\n        try:\n            values = config.split('|')\n\n            if len(values) == 9:\n                name, url, cookies, title_tag, enabled, search_mode, search_fallback, enable_daily, enable_backlog = values\n            elif len(values) == 10:\n                name, url, cookies, title_tag, enabled, search_mode, search_fallback, enable_daily, enable_backlog, enable_manualsearch = values\n            elif len(values) == 8:\n                name, url, cookies, enabled, search_mode, search_fallback, enable_daily, enable_backlog = values\n            else:\n                enabled = values[4]\n                name = values[0]\n                url = values[1]\n        except ValueError:\n            log.error('Skipping RSS Torrent provider string: {0}, incorrect format', config)\n            return None\n\n        new_provider = TorrentRssProvider(\n            name, url, cookies=cookies, title_tag=title_tag, search_mode=search_mode, search_fallback=search_fallback,\n            enable_daily=enable_daily, enable_backlog=enable_backlog, enable_manualsearch=enable_manualsearch\n        )\n        new_provider.enabled = enabled == '1'\n\n        return new_provider\n\n    def validate_rss(self):\n        \"\"\"Validate if RSS.\"\"\"\n        try:\n            add_cookie = self.add_cookies_from_ui()\n            if not add_cookie.get('result'):\n                return add_cookie\n\n            data = self.cache._get_rss_data()['entries']\n            if not data:\n                return {'result': False,\n                        'message': 'No items found in the RSS feed {0}'.format(self.url)}\n\n            title, url = self._get_title_and_url(data[0])\n\n            if not title:\n                return {'result': False,\n                        'message': 'Unable to get title from first item'}\n\n            if not url:\n                return {'result': False,\n                        'message': 'Unable to get torrent url from first item'}\n\n            if url.startswith('magnet:') and re.search(r'urn:btih:([\\w]{32,40})', url):\n                return {'result': True,\n                        'message': 'RSS feed Parsed correctly'}\n            else:\n                torrent_file = self.session.get_content(url)\n                try:\n                    bdecode(torrent_file)\n                except Exception as error:\n                    self.dump_html(torrent_file)\n                    return {'result': False,\n                            'message': 'Torrent link is not a valid torrent file: {0}'.format(ex(error))}\n\n            return {'result': True, 'message': 'RSS feed Parsed correctly'}\n\n        except Exception as error:\n            return {'result': False, 'message': 'Error when trying to load RSS: {0}'.format(ex(error))}\n\n    @staticmethod\n    def dump_html(data):\n        \"\"\"Dump html data.\"\"\"\n        dump_name = os.path.join(app.CACHE_DIR, 'custom_torrent.html')\n\n        try:\n            file_out = io.open(dump_name, 'wb')\n            file_out.write(data)\n            file_out.close()\n            helpers.chmod_as_parent(dump_name)\n        except IOError as error:\n            log.error('Unable to save the file: {0}', error)\n            return False\n\n        log.info('Saved custom_torrent html dump {0} ', dump_name)\n        return True\n\n\nclass TorrentRssCache(tv.Cache):\n    \"\"\"RSS torrent cache class.\"\"\"\n\n    def _get_rss_data(self):\n        \"\"\"Get RSS data.\"\"\"\n        return self.get_rss_feed(self.provider.url)\n", "path": "medusa/providers/torrent/rss/rsstorrent.py"}], "after_files": [{"content": "# coding=utf-8\n\n\"\"\"Provider code for RSS Torrents.\"\"\"\n\nfrom __future__ import unicode_literals\n\nimport io\nimport logging\nimport os\nimport re\n\nfrom bencode import bdecode\n\nfrom medusa import (\n    app,\n    helpers,\n    tv,\n)\nfrom medusa.helper.exceptions import ex\nfrom medusa.providers.torrent.torrent_provider import TorrentProvider\n\nlog = logging.getLogger(__name__)\nlog.logger.addHandler(logging.NullHandler())\n\n\nclass TorrentRssProvider(TorrentProvider):\n    \"\"\"Torrent RSS provider.\"\"\"\n\n    def __init__(self, name, url, cookies='',\n                 title_tag='title', search_mode='eponly', search_fallback=False,\n                 enable_daily=False, enable_backlog=False, enable_manualsearch=False):\n        \"\"\"Initialize the class.\"\"\"\n        super(TorrentRssProvider, self).__init__(name)\n\n        # Credentials\n\n        # URLs\n        self.url = url.rstrip('/')\n\n        # Proper Strings\n\n        # Miscellaneous Options\n        self.supports_backlog = False\n        self.search_mode = search_mode\n        self.search_fallback = search_fallback\n        self.enable_daily = enable_daily\n        self.enable_manualsearch = enable_manualsearch\n        self.enable_backlog = enable_backlog\n        self.enable_cookies = bool(cookies)\n        self.cookies = cookies\n        self.required_cookies = ('uid', 'pass')\n        self.title_tag = title_tag\n\n        # Torrent Stats\n\n        # Cache\n        self.cache = TorrentRssCache(self, min_time=15)\n\n    def _get_title_and_url(self, item):\n        \"\"\"Get title and url from result.\"\"\"\n        title = item.get(self.title_tag, '').replace(' ', '.')\n\n        attempt_list = [\n            lambda: item.get('torrent_magneturi'),\n            lambda: item.enclosures[0].href,\n            lambda: item.get('link')\n        ]\n\n        url = None\n        for cur_attempt in attempt_list:\n            try:\n                url = cur_attempt()\n            except Exception:\n                continue\n\n            if title and url:\n                break\n\n        return title, url\n\n    def config_string(self):\n        \"\"\"Return default RSS torrent provider config setting.\"\"\"\n        return '{}|{}|{}|{}|{}|{}|{}|{}|{}|{}'.format(\n            self.name or '',\n            self.url or '',\n            self.cookies or '',\n            self.title_tag or '',\n            int(self.enabled),\n            self.search_mode or '',\n            int(self.search_fallback),\n            int(self.enable_daily),\n            int(self.enable_manualsearch),\n            int(self.enable_backlog)\n        )\n\n    @staticmethod\n    def get_providers_list(data):\n        \"\"\"Get RSS torrent provider list.\"\"\"\n        providers_list = [x for x in (TorrentRssProvider._make_provider(x) for x in data.split('!!!')) if x]\n        seen_values = set()\n        providers_set = []\n\n        for provider in providers_list:\n            value = provider.name\n\n            if value not in seen_values:\n                providers_set.append(provider)\n                seen_values.add(value)\n\n        return [x for x in providers_set if x]\n\n    def image_name(self):\n        \"\"\"Return RSS torrent image.\"\"\"\n        if os.path.isfile(os.path.join(app.PROG_DIR, 'static/images/providers/', self.get_id() + '.png')):\n            return self.get_id() + '.png'\n        return 'torrentrss.png'\n\n    @staticmethod\n    def _make_provider(config):\n        \"\"\"Create new RSS provider.\"\"\"\n        if not config:\n            return None\n\n        cookies = ''\n        enable_backlog = 0\n        enable_daily = 0\n        enable_manualsearch = 0\n        search_fallback = 0\n        search_mode = 'eponly'\n        title_tag = 'title'\n\n        try:\n            values = config.split('|')\n\n            if len(values) == 9:\n                name, url, cookies, title_tag, enabled, search_mode, search_fallback, enable_daily, enable_backlog = values\n            elif len(values) == 10:\n                name, url, cookies, title_tag, enabled, search_mode, search_fallback, enable_daily, enable_backlog, enable_manualsearch = values\n            elif len(values) == 8:\n                name, url, cookies, enabled, search_mode, search_fallback, enable_daily, enable_backlog = values\n            else:\n                enabled = values[4]\n                name = values[0]\n                url = values[1]\n        except ValueError:\n            log.error('Skipping RSS Torrent provider string: {0}, incorrect format', config)\n            return None\n\n        new_provider = TorrentRssProvider(\n            name, url, cookies=cookies, title_tag=title_tag, search_mode=search_mode, search_fallback=search_fallback,\n            enable_daily=enable_daily, enable_backlog=enable_backlog, enable_manualsearch=enable_manualsearch\n        )\n        new_provider.enabled = enabled == '1'\n\n        return new_provider\n\n    def validate_rss(self):\n        \"\"\"Validate if RSS.\"\"\"\n        try:\n            if self.enable_cookies:\n                add_cookie = self.add_cookies_from_ui()\n                if not add_cookie.get('result'):\n                    return add_cookie\n\n            data = self.cache._get_rss_data()['entries']\n            if not data:\n                return {'result': False,\n                        'message': 'No items found in the RSS feed {0}'.format(self.url)}\n\n            title, url = self._get_title_and_url(data[0])\n\n            if not title:\n                return {'result': False,\n                        'message': 'Unable to get title from first item'}\n\n            if not url:\n                return {'result': False,\n                        'message': 'Unable to get torrent url from first item'}\n\n            if url.startswith('magnet:') and re.search(r'urn:btih:([\\w]{32,40})', url):\n                return {'result': True,\n                        'message': 'RSS feed Parsed correctly'}\n            else:\n                torrent_file = self.session.get_content(url)\n                try:\n                    bdecode(torrent_file)\n                except Exception as error:\n                    self.dump_html(torrent_file)\n                    return {'result': False,\n                            'message': 'Torrent link is not a valid torrent file: {0}'.format(ex(error))}\n\n            return {'result': True, 'message': 'RSS feed Parsed correctly'}\n\n        except Exception as error:\n            return {'result': False, 'message': 'Error when trying to load RSS: {0}'.format(ex(error))}\n\n    @staticmethod\n    def dump_html(data):\n        \"\"\"Dump html data.\"\"\"\n        dump_name = os.path.join(app.CACHE_DIR, 'custom_torrent.html')\n\n        try:\n            file_out = io.open(dump_name, 'wb')\n            file_out.write(data)\n            file_out.close()\n            helpers.chmod_as_parent(dump_name)\n        except IOError as error:\n            log.error('Unable to save the file: {0}', error)\n            return False\n\n        log.info('Saved custom_torrent html dump {0} ', dump_name)\n        return True\n\n\nclass TorrentRssCache(tv.Cache):\n    \"\"\"RSS torrent cache class.\"\"\"\n\n    def _get_rss_data(self):\n        \"\"\"Get RSS data.\"\"\"\n        return self.get_rss_feed(self.provider.url)\n", "path": "medusa/providers/torrent/rss/rsstorrent.py"}]}