use the default parser of StandardBrowser

This commit is contained in:
Romain Bignon 2013-08-27 17:50:58 +02:00
commit c7195b48a2
2 changed files with 2 additions and 12 deletions

View file

@ -52,7 +52,7 @@ Benjamin Carton <carton_ben@yahoo.fr>
* handjoob application.
Pierre Mazière <pierre.maziere@gmx.com>
* LCL module maintainer;
* LCL and RockRadio modules maintainer;
* BNPorc fixes.
Xavier Guerrin <xavier@tuxfamily.org>

View file

@ -20,22 +20,15 @@
# along with weboob. If not, see <http://www.gnu.org/licenses/>.
import lxml.html
from weboob.capabilities.radio import ICapRadio, Radio, Stream, Emission
from weboob.capabilities.collection import ICapCollection
from weboob.tools.backend import BaseBackend
from weboob.tools.browser import StandardBrowser
from weboob.tools.parsers.iparser import IParser
__all__ = ['RockRadioBackend']
class LxmlParser(IParser):
def parse(self, data, encoding=None):
return lxml.html.fromstring(data.read())
class RockRadioBackend(BaseBackend, ICapRadio, ICapCollection):
NAME = 'rockradio'
MAINTAINER = u'Pierre Mazière'
@ -47,12 +40,9 @@ class RockRadioBackend(BaseBackend, ICapRadio, ICapCollection):
ALLINFO = 'http://www.rockradio.com'
# FIXME
#
#
# MPlayer does not like the pls file sent from this site.
def create_default_browser(self):
return self.create_browser(parser=LxmlParser())
def _parse_current(self, data):
current = data.split(' - ')
if len(current) == 2: