[francetelevisions] fix #1282
This commit is contained in:
parent
46bf1274db
commit
a9397dbfcf
2 changed files with 6 additions and 1 deletions
|
|
@ -33,6 +33,7 @@ __all__ = ['PluzzBrowser']
|
|||
|
||||
class PluzzBrowser(BaseBrowser):
|
||||
DOMAIN = 'pluzz.francetv.fr'
|
||||
ENCODING = 'utf-8'
|
||||
PAGES = {r'http://[w\.]*pluzz.francetv.fr/replay/1': IndexPage,
|
||||
r'http://[w\.]*pluzz.francetv.fr/recherche.*': IndexPage,
|
||||
r'http://[w\.]*pluzz.francetv.fr/videos/(.+).html': VideoPage,
|
||||
|
|
|
|||
|
|
@ -46,7 +46,11 @@ class IndexPage(BasePage):
|
|||
video.title = unicode(title.text.strip())
|
||||
for p in div.xpath('.//p[@class="bientot"]'):
|
||||
video.title += ' - %s' % p.text.split('|')[0].strip()
|
||||
video.date = parse_dt(div.find('span').attrib['data-date'])
|
||||
date = div.xpath('.//p[@class="diffusion"]')[0].text.split('|')[0].strip()
|
||||
pattern = re.compile(r'(\d{2}-\d{2}-\d{2})(.*?)(\d{2}:\d{2})')
|
||||
match = pattern.search(date)
|
||||
if match:
|
||||
video.date = parse_dt("%s %s" % (match.group(1), match.group(3)))
|
||||
duration = div.xpath('.//span[@class="type-duree"]')[0].text.split('|')[1].strip()
|
||||
if duration[-1:] == "'":
|
||||
t = [0, int(duration[:-1])]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue