diff --git a/modules/nihonnooto/backend.py b/modules/nihonnooto/backend.py index b384ec57..873ff709 100644 --- a/modules/nihonnooto/backend.py +++ b/modules/nihonnooto/backend.py @@ -16,7 +16,7 @@ # You should have received a copy of the GNU Affero General Public License # along with weboob. If not, see . -from weboob.capabilities.radio import ICapRadio, Radio, Stream +from weboob.capabilities.radio import ICapRadio, Radio from weboob.tools.backend import BaseBackend from .browser import NihonNoOtoBrowser @@ -39,7 +39,7 @@ class NihonNoOtoBackend(BaseBackend, ICapRadio): if pattern.lower() in radio.title.lower() or pattern.lower() in radio.description.lower(): self.browser.get_current_emission() radio.current = self.browser.get_current_emission() - + yield radio def get_radio(self, radio): diff --git a/modules/nihonnooto/pages.py b/modules/nihonnooto/pages.py index 3a319e60..869dcb9b 100644 --- a/modules/nihonnooto/pages.py +++ b/modules/nihonnooto/pages.py @@ -30,7 +30,7 @@ class LivePage(BasePage): radio.streams = [] index = -1 - + for el in self.document.xpath('//source'): index += 1 mime_type = el.attrib['type'] diff --git a/modules/nihonnooto/test.py b/modules/nihonnooto/test.py index 6a05201d..cce4f642 100644 --- a/modules/nihonnooto/test.py +++ b/modules/nihonnooto/test.py @@ -19,12 +19,11 @@ from weboob.tools.test import BackendTest -from weboob.capabilities.radio import Radio class NihonNoOtoTest(BackendTest): BACKEND = 'nihonnooto' def test_nihonnooto(self): - l = list(self.backend.iter_radios_search('') + l = list(self.backend.iter_radios_search('')) self.assertTrue(len(l) > 0)