-# coding: utf-8
-from __future__ import unicode_literals
-
-import datetime
+import datetime as dt
import hashlib
import re
import time
f['height'] = int_or_none(format_id[:-1])
formats.append(f)
- self._sort_formats(formats, ('res', 'quality'))
publish_time = parse_iso8601(self._html_search_regex(
r'发布时间 ([^<>]+) ', page, 'publish time', default=None),
- delimiter=' ', timezone=datetime.timedelta(hours=8))
+ delimiter=' ', timezone=dt.timedelta(hours=8))
description = self._html_search_meta('description', page, fatal=False)
return {
'thumbnail': playurl['pic'],
'description': description,
'timestamp': publish_time,
+ '_format_sort_fields': ('res', 'quality'),
}
media_id = uu + '_' + vu
formats = self._get_formats('flash', uu, vu, media_id) + self._get_formats('html5', uu, vu, media_id)
- self._sort_formats(formats)
return {
'id': media_id,