fix franceinter radio
This commit is contained in:
parent
76c54b7ff8
commit
f3b2cea4ea
6 changed files with 26 additions and 22 deletions
|
|
@ -27,12 +27,7 @@ __all__ = ['XMLinfos']
|
|||
|
||||
class XMLinfos(BasePage):
|
||||
def get_current(self):
|
||||
try:
|
||||
for channel in self.parser.select(self.document.getroot(), 'channel'):
|
||||
emission = channel.find('item/song_title').text
|
||||
#artist = channel.find('item/artist_name').text
|
||||
except AttributeError:
|
||||
emission = "Not defined"
|
||||
# artist = "Not defined"
|
||||
|
||||
return unicode(emission).strip()
|
||||
emissions = self.parser.select(self.document.getroot(), 'item')
|
||||
if len(emissions) == 0:
|
||||
return 'No emission'
|
||||
return emissions[0].find('titreemission').text
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue