diff --git a/weboob/backends/ina/pages/video.py b/weboob/backends/ina/pages/video.py index e073ac70..141db39a 100644 --- a/weboob/backends/ina/pages/video.py +++ b/weboob/backends/ina/pages/video.py @@ -44,6 +44,7 @@ class VideoPage(BasePage): video.url = self.get_url() video.date = date video.duration = duration + video.description = self.get_description() return video def get_id(self): @@ -53,6 +54,11 @@ class VideoPage(BasePage): warning('Unable to parse ID') return 0 + def get_description(self): + el = self.document.getroot().cssselect('div.bloc-produit-haut div.contenu p')[0] + if el is not None: + return el.text.strip() + def get_date_and_duration(self): duration_regexp = re.compile('(.+) - (.+)min(.+)s') el = self.document.getroot().cssselect('div.bloc-produit-haut p.date')[0] diff --git a/weboob/capabilities/video.py b/weboob/capabilities/video.py index 288ea855..9567d9fa 100644 --- a/weboob/capabilities/video.py +++ b/weboob/capabilities/video.py @@ -48,6 +48,7 @@ class BaseVideo(CapBaseObject): self.add_field('title', basestring, title) self.add_field('url', basestring, url) self.add_field('author', basestring, author) + self.add_field('description', basestring) self.add_field('duration', (int,long,timedelta), duration) self.add_field('date', datetime, date) self.add_field('rating', (int,long,float), rating)