modify gdcvault module to use the new BaseVideo/ICapVideo classes
This commit is contained in:
parent
5617a06c2e
commit
dae97bd278
1 changed files with 3 additions and 2 deletions
|
|
@ -29,7 +29,7 @@ import datetime
|
||||||
from dateutil.parser import parse as parse_dt
|
from dateutil.parser import parse as parse_dt
|
||||||
|
|
||||||
from weboob.capabilities.base import NotAvailable
|
from weboob.capabilities.base import NotAvailable
|
||||||
from weboob.tools.capabilities.thumbnail import Thumbnail
|
from weboob.capabilities.image import BaseImage
|
||||||
from weboob.tools.browser import BrokenPageError
|
from weboob.tools.browser import BrokenPageError
|
||||||
|
|
||||||
#HACK
|
#HACK
|
||||||
|
|
@ -70,7 +70,8 @@ class IndexPage(BasePage):
|
||||||
# get thumbnail
|
# get thumbnail
|
||||||
img = self.parser.select(a, 'div.featured_image img', 1)
|
img = self.parser.select(a, 'div.featured_image img', 1)
|
||||||
if img is not None:
|
if img is not None:
|
||||||
video.thumbnail = Thumbnail(unicode(img.attrib['src']))
|
video.thumbnail = BaseImage(img.attrib['src'])
|
||||||
|
video.thumbnail.url = video.thumbnail.id
|
||||||
else:
|
else:
|
||||||
video.thumbnail = NotAvailable
|
video.thumbnail = NotAvailable
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue