# -*- coding: utf-8 -*-
# Copyright(C) 2010-2011 Roger Philibert
#
# This file is part of weboob.
#
# weboob is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# weboob is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with weboob. If not, see
,
and other html...
# XXX: 1013422 has all 3 and !=
if 'overview' in data:
video.description = unicode(data['overview'])
elif 'spell' in data:
video.description = unicode(data['spell'])
else:
video.description = unicode(data.get('description', ''))
if 'image' in data:
video.thumbnail = BaseImage(data['image'])
video.thumbnail.url = video.thumbnail.id
if 'speakers_name' in data:
video.author = unicode(", ".join(data['speakers_name']))
if 'start_date' in data:
video.date = parse_dt(data['start_date'])
if 'score' in data:
video.rating = data['score']
video.set_empty_fields(NotAvailable)
return video