parent
1824a7242a
commit
4940d6d8a6
1 changed files with 1 additions and 3 deletions
|
|
@ -63,11 +63,9 @@ class IndexPage(BasePage):
|
|||
else:
|
||||
raise BrokenPageError('Unable to parse duration %r' % self.parser.select(div, 'div.duration', 1).text)
|
||||
video.duration = datetime.timedelta(hours=int(hours), minutes=int(minutes), seconds=int(seconds))
|
||||
url = unicode(self.parser.select(div, 'img.dmco_image', 1).attrib['data-src'])
|
||||
url = unicode(self.parser.select(div, 'img.preview', 1).attrib['data-src'])
|
||||
# remove the useless anti-caching
|
||||
url = re.sub('\?\d+', '', url)
|
||||
# use the bigger thumbnail
|
||||
url = url.replace('jpeg_preview_medium.jpg', 'jpeg_preview_large.jpg')
|
||||
video.thumbnail = Thumbnail(unicode(url))
|
||||
|
||||
video.set_empty_fields(NotAvailable, ('url',))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue