fix when the title/artist information is not available
This commit is contained in:
parent
ffca80282b
commit
61619a30b5
1 changed files with 3 additions and 3 deletions
|
|
@ -25,6 +25,6 @@ __all__ = ['PlayerPage']
|
||||||
|
|
||||||
class PlayerPage(BasePage):
|
class PlayerPage(BasePage):
|
||||||
def get_current(self):
|
def get_current(self):
|
||||||
title = select(self.document.getroot(), 'span.titre_en_cours', 1).text.strip()
|
title = select(self.document.getroot(), 'span.titre_en_cours', 1).text
|
||||||
artist = select(self.document.getroot(), 'span.artiste_en_cours', 1).text.strip()
|
artist = select(self.document.getroot(), 'span.artiste_en_cours', 1).text
|
||||||
return unicode(artist), unicode(title)
|
return unicode(artist).strip(), unicode(title).strip()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue