[francetelevisions] fix bug search date in bad balise

This commit is contained in:
Bezleputh 2015-01-19 16:00:09 +01:00 committed by Romain Bignon
commit 0096efc556
2 changed files with 2 additions and 2 deletions

View file

@ -72,7 +72,7 @@ class VideoListPage(HTMLPage):
obj_id = Regexp(Link('.'), '^/videos/.+,(.+).html$')
obj_title = CleanText('//meta[@name="programme_titre"]/@content')
obj_date = DateTime(Regexp(CleanText('./div[@class="autre-emission-c2"]',
obj_date = DateTime(Regexp(CleanText('./div[@class="autre-emission-c2"]|./div[@class="autre-emission-c4"]',
replace=[(u'à', u''), (u' ', u' ')]),
'(\d{2}-\d{2}.+\d{1,2}:\d{1,2})'),
dayfirst=True)

View file

@ -26,7 +26,7 @@ class PluzzTest(BackendTest):
def test_search(self):
# If the test fails, it might be good news!
l = list(self.backend.search_videos('d art'))
l = list(self.backend.search_videos("d'art"))
self.assertTrue(len(l) > 0)
v = l[0]
self.backend.fillobj(v, ('url',))