[francetelevisions] fix bug while getting video from some url
This commit is contained in:
parent
ef12721808
commit
a1ccdc9d7a
2 changed files with 2 additions and 2 deletions
|
|
@ -46,7 +46,7 @@ class VideoListPage(HTMLPage):
|
||||||
|
|
||||||
obj_id = CleanText('//div[@id="diffusion-info"]/@data-diffusion')
|
obj_id = CleanText('//div[@id="diffusion-info"]/@data-diffusion')
|
||||||
obj_title = CleanText('//div[@id="diffusion-info"]/h1/div[@id="diffusion-titre"]')
|
obj_title = CleanText('//div[@id="diffusion-info"]/h1/div[@id="diffusion-titre"]')
|
||||||
obj_date = DateTime(Regexp(CleanText('//div[@id="diffusion-info"]/div/div/*[1]',
|
obj_date = DateTime(Regexp(CleanText('//div[@id="diffusion-info"]/h1|//div[@id="diffusion-info"]/div/div/*[1]',
|
||||||
replace=[(u'à', u''), (u' ', u' ')]),
|
replace=[(u'à', u''), (u' ', u' ')]),
|
||||||
'.+(\d{2}-\d{2}-\d{2}.+\d{1,2}h\d{1,2}).+'),
|
'.+(\d{2}-\d{2}-\d{2}.+\d{1,2}h\d{1,2}).+'),
|
||||||
dayfirst=True)
|
dayfirst=True)
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ class PluzzTest(BackendTest):
|
||||||
|
|
||||||
def test_search(self):
|
def test_search(self):
|
||||||
# If the test fails, it might be good news!
|
# If the test fails, it might be good news!
|
||||||
l = list(self.backend.search_videos("onpc"))
|
l = list(self.backend.search_videos("pblv"))
|
||||||
self.assertTrue(len(l) > 0)
|
self.assertTrue(len(l) > 0)
|
||||||
v = l[0]
|
v = l[0]
|
||||||
self.backend.fillobj(v, ('url',))
|
self.backend.fillobj(v, ('url',))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue