do not use thumbnail_url anymore (closes #810), use set_empty_fields() method, do not give fields in constructor of BaseVideo anymore
This commit is contained in:
parent
56691d7ea7
commit
ef07a9e795
11 changed files with 79 additions and 66 deletions
|
|
@ -22,7 +22,7 @@ import urllib
|
|||
import re
|
||||
|
||||
from weboob.tools.capabilities.thumbnail import Thumbnail
|
||||
from weboob.capabilities.base import NotAvailable
|
||||
from weboob.capabilities import NotAvailable
|
||||
from weboob.tools.misc import html2text
|
||||
from weboob.tools.browser import BasePage, BrokenPageError
|
||||
|
||||
|
|
@ -73,8 +73,8 @@ class IndexPage(BasePage):
|
|||
rating_div = self.parser.select(div, 'div.small_stars', 1)
|
||||
video.rating_max = self.get_rate(rating_div)
|
||||
video.rating = self.get_rate(rating_div.find('div'))
|
||||
# XXX missing date
|
||||
video.date = NotAvailable
|
||||
|
||||
video.set_empty_fields(NotAvailable, ('url',))
|
||||
yield video
|
||||
|
||||
def get_rate(self, div):
|
||||
|
|
@ -109,4 +109,6 @@ class VideoPage(BasePage):
|
|||
mediaURL = urllib.unquote(mobj.group(1))
|
||||
video.url = mediaURL
|
||||
|
||||
video.set_empty_fields(NotAvailable)
|
||||
|
||||
return video
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue