You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

635 lines
24 KiB

10 years ago
10 years ago
10 years ago
  1. # coding: utf-8
  2. from __future__ import unicode_literals
  3. import collections
  4. import re
  5. from .common import InfoExtractor
  6. from ..compat import compat_urlparse
  7. from ..utils import (
  8. clean_html,
  9. ExtractorError,
  10. get_element_by_class,
  11. int_or_none,
  12. orderedSet,
  13. remove_start,
  14. str_or_none,
  15. str_to_int,
  16. unescapeHTML,
  17. unified_timestamp,
  18. url_or_none,
  19. urlencode_postdata,
  20. )
  21. from .dailymotion import DailymotionIE
  22. from .pladform import PladformIE
  23. from .vimeo import VimeoIE
  24. from .youtube import YoutubeIE
  25. class VKBaseIE(InfoExtractor):
  26. _NETRC_MACHINE = 'vk'
  27. def _login(self):
  28. username, password = self._get_login_info()
  29. if username is None:
  30. return
  31. login_page, url_handle = self._download_webpage_handle(
  32. 'https://vk.com', None, 'Downloading login page')
  33. login_form = self._hidden_inputs(login_page)
  34. login_form.update({
  35. 'email': username.encode('cp1251'),
  36. 'pass': password.encode('cp1251'),
  37. })
  38. # vk serves two same remixlhk cookies in Set-Cookie header and expects
  39. # first one to be actually set
  40. self._apply_first_set_cookie_header(url_handle, 'remixlhk')
  41. login_page = self._download_webpage(
  42. 'https://login.vk.com/?act=login', None,
  43. note='Logging in',
  44. data=urlencode_postdata(login_form))
  45. if re.search(r'onLoginFailed', login_page):
  46. raise ExtractorError(
  47. 'Unable to login, incorrect username and/or password', expected=True)
  48. def _real_initialize(self):
  49. self._login()
  50. class VKIE(VKBaseIE):
  51. IE_NAME = 'vk'
  52. IE_DESC = 'VK'
  53. _VALID_URL = r'''(?x)
  54. https?://
  55. (?:
  56. (?:
  57. (?:(?:m|new)\.)?vk\.com/video_|
  58. (?:www\.)?daxab.com/
  59. )
  60. ext\.php\?(?P<embed_query>.*?\boid=(?P<oid>-?\d+).*?\bid=(?P<id>\d+).*)|
  61. (?:
  62. (?:(?:m|new)\.)?vk\.com/(?:.+?\?.*?z=)?video|
  63. (?:www\.)?daxab.com/embed/
  64. )
  65. (?P<videoid>-?\d+_\d+)(?:.*\blist=(?P<list_id>[\da-f]+))?
  66. )
  67. '''
  68. _TESTS = [
  69. {
  70. 'url': 'http://vk.com/videos-77521?z=video-77521_162222515%2Fclub77521',
  71. 'md5': '7babad3b85ea2e91948005b1b8b0cb84',
  72. 'info_dict': {
  73. 'id': '-77521_162222515',
  74. 'ext': 'mp4',
  75. 'title': 'ProtivoGunz - Хуёвая песня',
  76. 'uploader': 're:(?:Noize MC|Alexander Ilyashenko).*',
  77. 'uploader_id': '-77521',
  78. 'duration': 195,
  79. 'timestamp': 1329049880,
  80. 'upload_date': '20120212',
  81. },
  82. },
  83. {
  84. 'url': 'http://vk.com/video205387401_165548505',
  85. 'md5': '6c0aeb2e90396ba97035b9cbde548700',
  86. 'info_dict': {
  87. 'id': '205387401_165548505',
  88. 'ext': 'mp4',
  89. 'title': 'No name',
  90. 'uploader': 'Tom Cruise',
  91. 'uploader_id': '205387401',
  92. 'duration': 9,
  93. 'timestamp': 1374364108,
  94. 'upload_date': '20130720',
  95. }
  96. },
  97. {
  98. 'note': 'Embedded video',
  99. 'url': 'http://vk.com/video_ext.php?oid=32194266&id=162925554&hash=7d8c2e0d5e05aeaa&hd=1',
  100. 'md5': 'c7ce8f1f87bec05b3de07fdeafe21a0a',
  101. 'info_dict': {
  102. 'id': '32194266_162925554',
  103. 'ext': 'mp4',
  104. 'uploader': 'Vladimir Gavrin',
  105. 'title': 'Lin Dan',
  106. 'duration': 101,
  107. 'upload_date': '20120730',
  108. 'view_count': int,
  109. },
  110. 'skip': 'This video has been removed from public access.',
  111. },
  112. {
  113. # VIDEO NOW REMOVED
  114. # please update if you find a video whose URL follows the same pattern
  115. 'url': 'http://vk.com/video-8871596_164049491',
  116. 'md5': 'a590bcaf3d543576c9bd162812387666',
  117. 'note': 'Only available for registered users',
  118. 'info_dict': {
  119. 'id': '-8871596_164049491',
  120. 'ext': 'mp4',
  121. 'uploader': 'Триллеры',
  122. 'title': '► Бойцовский клуб / Fight Club 1999 [HD 720]',
  123. 'duration': 8352,
  124. 'upload_date': '20121218',
  125. 'view_count': int,
  126. },
  127. 'skip': 'Requires vk account credentials',
  128. },
  129. {
  130. 'url': 'http://vk.com/hd_kino_mania?z=video-43215063_168067957%2F15c66b9b533119788d',
  131. 'md5': '4d7a5ef8cf114dfa09577e57b2993202',
  132. 'info_dict': {
  133. 'id': '-43215063_168067957',
  134. 'ext': 'mp4',
  135. 'uploader': 'Киномания - лучшее из мира кино',
  136. 'title': ' ',
  137. 'duration': 7291,
  138. 'upload_date': '20140328',
  139. },
  140. 'skip': 'Requires vk account credentials',
  141. },
  142. {
  143. 'url': 'http://m.vk.com/video-43215063_169084319?list=125c627d1aa1cebb83&from=wall-43215063_2566540',
  144. 'md5': '0c45586baa71b7cb1d0784ee3f4e00a6',
  145. 'note': 'ivi.ru embed',
  146. 'info_dict': {
  147. 'id': '-43215063_169084319',
  148. 'ext': 'mp4',
  149. 'title': 'Книга Илая',
  150. 'duration': 6771,
  151. 'upload_date': '20140626',
  152. 'view_count': int,
  153. },
  154. 'skip': 'Only works from Russia',
  155. },
  156. {
  157. # video (removed?) only available with list id
  158. 'url': 'https://vk.com/video30481095_171201961?list=8764ae2d21f14088d4',
  159. 'md5': '091287af5402239a1051c37ec7b92913',
  160. 'info_dict': {
  161. 'id': '30481095_171201961',
  162. 'ext': 'mp4',
  163. 'title': 'ТюменцевВВ_09.07.2015',
  164. 'uploader': 'Anton Ivanov',
  165. 'duration': 109,
  166. 'upload_date': '20150709',
  167. 'view_count': int,
  168. },
  169. 'skip': 'Removed',
  170. },
  171. {
  172. # youtube embed
  173. 'url': 'https://vk.com/video276849682_170681728',
  174. 'info_dict': {
  175. 'id': 'V3K4mi0SYkc',
  176. 'ext': 'mp4',
  177. 'title': "DSWD Awards 'Children's Joy Foundation, Inc.' Certificate of Registration and License to Operate",
  178. 'description': 'md5:bf9c26cfa4acdfb146362682edd3827a',
  179. 'duration': 178,
  180. 'upload_date': '20130116',
  181. 'uploader': "Children's Joy Foundation Inc.",
  182. 'uploader_id': 'thecjf',
  183. 'view_count': int,
  184. },
  185. },
  186. {
  187. # dailymotion embed
  188. 'url': 'https://vk.com/video-37468416_456239855',
  189. 'info_dict': {
  190. 'id': 'k3lz2cmXyRuJQSjGHUv',
  191. 'ext': 'mp4',
  192. 'title': 'md5:d52606645c20b0ddbb21655adaa4f56f',
  193. # TODO: fix test by fixing dailymotion description extraction
  194. 'description': 'md5:c651358f03c56f1150b555c26d90a0fd',
  195. 'uploader': 'AniLibria.Tv',
  196. 'upload_date': '20160914',
  197. 'uploader_id': 'x1p5vl5',
  198. 'timestamp': 1473877246,
  199. },
  200. 'params': {
  201. 'skip_download': True,
  202. },
  203. },
  204. {
  205. # video key is extra_data not url\d+
  206. 'url': 'http://vk.com/video-110305615_171782105',
  207. 'md5': 'e13fcda136f99764872e739d13fac1d1',
  208. 'info_dict': {
  209. 'id': '-110305615_171782105',
  210. 'ext': 'mp4',
  211. 'title': 'S-Dance, репетиции к The way show',
  212. 'uploader': 'THE WAY SHOW | 17 апреля',
  213. 'uploader_id': '-110305615',
  214. 'timestamp': 1454859345,
  215. 'upload_date': '20160207',
  216. },
  217. 'params': {
  218. 'skip_download': True,
  219. },
  220. },
  221. {
  222. # finished live stream, postlive_mp4
  223. 'url': 'https://vk.com/videos-387766?z=video-387766_456242764%2Fpl_-387766_-2',
  224. 'info_dict': {
  225. 'id': '-387766_456242764',
  226. 'ext': 'mp4',
  227. 'title': 'ИгроМир 2016 День 1 — Игромания Утром',
  228. 'uploader': 'Игромания',
  229. 'duration': 5239,
  230. # TODO: use act=show to extract view_count
  231. # 'view_count': int,
  232. 'upload_date': '20160929',
  233. 'uploader_id': '-387766',
  234. 'timestamp': 1475137527,
  235. },
  236. },
  237. {
  238. # live stream, hls and rtmp links, most likely already finished live
  239. # stream by the time you are reading this comment
  240. 'url': 'https://vk.com/video-140332_456239111',
  241. 'only_matching': True,
  242. },
  243. {
  244. # removed video, just testing that we match the pattern
  245. 'url': 'http://vk.com/feed?z=video-43215063_166094326%2Fbb50cacd3177146d7a',
  246. 'only_matching': True,
  247. },
  248. {
  249. # age restricted video, requires vk account credentials
  250. 'url': 'https://vk.com/video205387401_164765225',
  251. 'only_matching': True,
  252. },
  253. {
  254. # pladform embed
  255. 'url': 'https://vk.com/video-76116461_171554880',
  256. 'only_matching': True,
  257. },
  258. {
  259. 'url': 'http://new.vk.com/video205387401_165548505',
  260. 'only_matching': True,
  261. },
  262. {
  263. # This video is no longer available, because its author has been blocked.
  264. 'url': 'https://vk.com/video-10639516_456240611',
  265. 'only_matching': True,
  266. },
  267. {
  268. # The video is not available in your region.
  269. 'url': 'https://vk.com/video-51812607_171445436',
  270. 'only_matching': True,
  271. }]
  272. def _real_extract(self, url):
  273. mobj = re.match(self._VALID_URL, url)
  274. video_id = mobj.group('videoid')
  275. if video_id:
  276. info_url = 'https://vk.com/al_video.php?act=show_inline&al=1&video=' + video_id
  277. # Some videos (removed?) can only be downloaded with list id specified
  278. list_id = mobj.group('list_id')
  279. if list_id:
  280. info_url += '&list=%s' % list_id
  281. else:
  282. info_url = 'http://vk.com/video_ext.php?' + mobj.group('embed_query')
  283. video_id = '%s_%s' % (mobj.group('oid'), mobj.group('id'))
  284. info_page = self._download_webpage(info_url, video_id)
  285. error_message = self._html_search_regex(
  286. [r'(?s)<!><div[^>]+class="video_layer_message"[^>]*>(.+?)</div>',
  287. r'(?s)<div[^>]+id="video_ext_msg"[^>]*>(.+?)</div>'],
  288. info_page, 'error message', default=None)
  289. if error_message:
  290. raise ExtractorError(error_message, expected=True)
  291. if re.search(r'<!>/login\.php\?.*\bact=security_check', info_page):
  292. raise ExtractorError(
  293. 'You are trying to log in from an unusual location. You should confirm ownership at vk.com to log in with this IP.',
  294. expected=True)
  295. ERROR_COPYRIGHT = 'Video %s has been removed from public access due to rightholder complaint.'
  296. ERRORS = {
  297. r'>Видеозапись .*? была изъята из публичного доступа в связи с обращением правообладателя.<':
  298. ERROR_COPYRIGHT,
  299. r'>The video .*? was removed from public access by request of the copyright holder.<':
  300. ERROR_COPYRIGHT,
  301. r'<!>Please log in or <':
  302. 'Video %s is only available for registered users, '
  303. 'use --username and --password options to provide account credentials.',
  304. r'<!>Unknown error':
  305. 'Video %s does not exist.',
  306. r'<!>Видео временно недоступно':
  307. 'Video %s is temporarily unavailable.',
  308. r'<!>Access denied':
  309. 'Access denied to video %s.',
  310. r'<!>Видеозапись недоступна, так как её автор был заблокирован.':
  311. 'Video %s is no longer available, because its author has been blocked.',
  312. r'<!>This video is no longer available, because its author has been blocked.':
  313. 'Video %s is no longer available, because its author has been blocked.',
  314. r'<!>This video is no longer available, because it has been deleted.':
  315. 'Video %s is no longer available, because it has been deleted.',
  316. r'<!>The video .+? is not available in your region.':
  317. 'Video %s is not available in your region.',
  318. }
  319. for error_re, error_msg in ERRORS.items():
  320. if re.search(error_re, info_page):
  321. raise ExtractorError(error_msg % video_id, expected=True)
  322. youtube_url = YoutubeIE._extract_url(info_page)
  323. if youtube_url:
  324. return self.url_result(youtube_url, ie=YoutubeIE.ie_key())
  325. vimeo_url = VimeoIE._extract_url(url, info_page)
  326. if vimeo_url is not None:
  327. return self.url_result(vimeo_url)
  328. pladform_url = PladformIE._extract_url(info_page)
  329. if pladform_url:
  330. return self.url_result(pladform_url)
  331. m_rutube = re.search(
  332. r'\ssrc="((?:https?:)?//rutube\.ru\\?/(?:video|play)\\?/embed(?:.*?))\\?"', info_page)
  333. if m_rutube is not None:
  334. rutube_url = self._proto_relative_url(
  335. m_rutube.group(1).replace('\\', ''))
  336. return self.url_result(rutube_url)
  337. dailymotion_urls = DailymotionIE._extract_urls(info_page)
  338. if dailymotion_urls:
  339. return self.url_result(dailymotion_urls[0], DailymotionIE.ie_key())
  340. m_opts = re.search(r'(?s)var\s+opts\s*=\s*({.+?});', info_page)
  341. if m_opts:
  342. m_opts_url = re.search(r"url\s*:\s*'((?!/\b)[^']+)", m_opts.group(1))
  343. if m_opts_url:
  344. opts_url = m_opts_url.group(1)
  345. if opts_url.startswith('//'):
  346. opts_url = 'http:' + opts_url
  347. return self.url_result(opts_url)
  348. # vars does not look to be served anymore since 24.10.2016
  349. data = self._parse_json(
  350. self._search_regex(
  351. r'var\s+vars\s*=\s*({.+?});', info_page, 'vars', default='{}'),
  352. video_id, fatal=False)
  353. # <!json> is served instead
  354. if not data:
  355. data = self._parse_json(
  356. self._search_regex(
  357. [r'<!json>\s*({.+?})\s*<!>', r'<!json>\s*({.+})'],
  358. info_page, 'json', default='{}'),
  359. video_id)
  360. if data:
  361. data = data['player']['params'][0]
  362. if not data:
  363. data = self._parse_json(
  364. self._search_regex(
  365. r'var\s+playerParams\s*=\s*({.+?})\s*;\s*\n', info_page,
  366. 'player params'),
  367. video_id)['params'][0]
  368. title = unescapeHTML(data['md_title'])
  369. # 2 = live
  370. # 3 = post live (finished live)
  371. is_live = data.get('live') == 2
  372. if is_live:
  373. title = self._live_title(title)
  374. timestamp = unified_timestamp(self._html_search_regex(
  375. r'class=["\']mv_info_date[^>]+>([^<]+)(?:<|from)', info_page,
  376. 'upload date', default=None)) or int_or_none(data.get('date'))
  377. view_count = str_to_int(self._search_regex(
  378. r'class=["\']mv_views_count[^>]+>\s*([\d,.]+)',
  379. info_page, 'view count', default=None))
  380. formats = []
  381. for format_id, format_url in data.items():
  382. format_url = url_or_none(format_url)
  383. if not format_url or not format_url.startswith(('http', '//', 'rtmp')):
  384. continue
  385. if (format_id.startswith(('url', 'cache'))
  386. or format_id in ('extra_data', 'live_mp4', 'postlive_mp4')):
  387. height = int_or_none(self._search_regex(
  388. r'^(?:url|cache)(\d+)', format_id, 'height', default=None))
  389. formats.append({
  390. 'format_id': format_id,
  391. 'url': format_url,
  392. 'height': height,
  393. })
  394. elif format_id == 'hls':
  395. formats.extend(self._extract_m3u8_formats(
  396. format_url, video_id, 'mp4', 'm3u8_native',
  397. m3u8_id=format_id, fatal=False, live=is_live))
  398. elif format_id == 'rtmp':
  399. formats.append({
  400. 'format_id': format_id,
  401. 'url': format_url,
  402. 'ext': 'flv',
  403. })
  404. self._sort_formats(formats)
  405. return {
  406. 'id': video_id,
  407. 'formats': formats,
  408. 'title': title,
  409. 'thumbnail': data.get('jpg'),
  410. 'uploader': data.get('md_author'),
  411. 'uploader_id': str_or_none(data.get('author_id')),
  412. 'duration': data.get('duration'),
  413. 'timestamp': timestamp,
  414. 'view_count': view_count,
  415. 'like_count': int_or_none(data.get('liked')),
  416. 'dislike_count': int_or_none(data.get('nolikes')),
  417. 'is_live': is_live,
  418. }
  419. class VKUserVideosIE(VKBaseIE):
  420. IE_NAME = 'vk:uservideos'
  421. IE_DESC = "VK - User's Videos"
  422. _VALID_URL = r'https?://(?:(?:m|new)\.)?vk\.com/videos(?P<id>-?[0-9]+)(?!\?.*\bz=video)(?:[/?#&]|$)'
  423. _TEMPLATE_URL = 'https://vk.com/videos'
  424. _TESTS = [{
  425. 'url': 'http://vk.com/videos205387401',
  426. 'info_dict': {
  427. 'id': '205387401',
  428. 'title': "Tom Cruise's Videos",
  429. },
  430. 'playlist_mincount': 4,
  431. }, {
  432. 'url': 'http://vk.com/videos-77521',
  433. 'only_matching': True,
  434. }, {
  435. 'url': 'http://vk.com/videos-97664626?section=all',
  436. 'only_matching': True,
  437. }, {
  438. 'url': 'http://m.vk.com/videos205387401',
  439. 'only_matching': True,
  440. }, {
  441. 'url': 'http://new.vk.com/videos205387401',
  442. 'only_matching': True,
  443. }]
  444. def _real_extract(self, url):
  445. page_id = self._match_id(url)
  446. webpage = self._download_webpage(url, page_id)
  447. entries = [
  448. self.url_result(
  449. 'http://vk.com/video' + video_id, 'VK', video_id=video_id)
  450. for video_id in orderedSet(re.findall(r'href="/video(-?[0-9_]+)"', webpage))]
  451. title = unescapeHTML(self._search_regex(
  452. r'<title>\s*([^<]+?)\s+\|\s+\d+\s+videos',
  453. webpage, 'title', default=page_id))
  454. return self.playlist_result(entries, page_id, title)
  455. class VKWallPostIE(VKBaseIE):
  456. IE_NAME = 'vk:wallpost'
  457. _VALID_URL = r'https?://(?:(?:(?:(?:m|new)\.)?vk\.com/(?:[^?]+\?.*\bw=)?wall(?P<id>-?\d+_\d+)))'
  458. _TESTS = [{
  459. # public page URL, audio playlist
  460. 'url': 'https://vk.com/bs.official?w=wall-23538238_35',
  461. 'info_dict': {
  462. 'id': '23538238_35',
  463. 'title': 'Black Shadow - Wall post 23538238_35',
  464. 'description': 'md5:3f84b9c4f9ef499731cf1ced9998cc0c',
  465. },
  466. 'playlist': [{
  467. 'md5': '5ba93864ec5b85f7ce19a9af4af080f6',
  468. 'info_dict': {
  469. 'id': '135220665_111806521',
  470. 'ext': 'mp3',
  471. 'title': 'Black Shadow - Слепое Верование',
  472. 'duration': 370,
  473. 'uploader': 'Black Shadow',
  474. 'artist': 'Black Shadow',
  475. 'track': 'Слепое Верование',
  476. },
  477. }, {
  478. 'md5': '4cc7e804579122b17ea95af7834c9233',
  479. 'info_dict': {
  480. 'id': '135220665_111802303',
  481. 'ext': 'mp3',
  482. 'title': 'Black Shadow - Война - Негасимое Бездны Пламя!',
  483. 'duration': 423,
  484. 'uploader': 'Black Shadow',
  485. 'artist': 'Black Shadow',
  486. 'track': 'Война - Негасимое Бездны Пламя!',
  487. },
  488. 'params': {
  489. 'skip_download': True,
  490. },
  491. }],
  492. 'params': {
  493. 'usenetrc': True,
  494. },
  495. 'skip': 'Requires vk account credentials',
  496. }, {
  497. # single YouTube embed, no leading -
  498. 'url': 'https://vk.com/wall85155021_6319',
  499. 'info_dict': {
  500. 'id': '85155021_6319',
  501. 'title': 'Sergey Gorbunov - Wall post 85155021_6319',
  502. },
  503. 'playlist_count': 1,
  504. 'params': {
  505. 'usenetrc': True,
  506. },
  507. 'skip': 'Requires vk account credentials',
  508. }, {
  509. # wall page URL
  510. 'url': 'https://vk.com/wall-23538238_35',
  511. 'only_matching': True,
  512. }, {
  513. # mobile wall page URL
  514. 'url': 'https://m.vk.com/wall-23538238_35',
  515. 'only_matching': True,
  516. }]
  517. def _real_extract(self, url):
  518. post_id = self._match_id(url)
  519. wall_url = 'https://vk.com/wall%s' % post_id
  520. post_id = remove_start(post_id, '-')
  521. webpage = self._download_webpage(wall_url, post_id)
  522. error = self._html_search_regex(
  523. r'>Error</div>\s*<div[^>]+class=["\']body["\'][^>]*>([^<]+)',
  524. webpage, 'error', default=None)
  525. if error:
  526. raise ExtractorError('VK said: %s' % error, expected=True)
  527. description = clean_html(get_element_by_class('wall_post_text', webpage))
  528. uploader = clean_html(get_element_by_class('author', webpage))
  529. thumbnail = self._og_search_thumbnail(webpage)
  530. entries = []
  531. audio_ids = re.findall(r'data-full-id=["\'](\d+_\d+)', webpage)
  532. if audio_ids:
  533. al_audio = self._download_webpage(
  534. 'https://vk.com/al_audio.php', post_id,
  535. note='Downloading audio info', fatal=False,
  536. data=urlencode_postdata({
  537. 'act': 'reload_audio',
  538. 'al': '1',
  539. 'ids': ','.join(audio_ids)
  540. }))
  541. if al_audio:
  542. Audio = collections.namedtuple(
  543. 'Audio', ['id', 'user_id', 'url', 'track', 'artist', 'duration'])
  544. audios = self._parse_json(
  545. self._search_regex(
  546. r'<!json>(.+?)<!>', al_audio, 'audios', default='[]'),
  547. post_id, fatal=False, transform_source=unescapeHTML)
  548. if isinstance(audios, list):
  549. for audio in audios:
  550. a = Audio._make(audio[:6])
  551. entries.append({
  552. 'id': '%s_%s' % (a.user_id, a.id),
  553. 'url': a.url,
  554. 'title': '%s - %s' % (a.artist, a.track) if a.artist and a.track else a.id,
  555. 'thumbnail': thumbnail,
  556. 'duration': a.duration,
  557. 'uploader': uploader,
  558. 'artist': a.artist,
  559. 'track': a.track,
  560. })
  561. for video in re.finditer(
  562. r'<a[^>]+href=(["\'])(?P<url>/video(?:-?[\d_]+).*?)\1', webpage):
  563. entries.append(self.url_result(
  564. compat_urlparse.urljoin(url, video.group('url')), VKIE.ie_key()))
  565. title = 'Wall post %s' % post_id
  566. return self.playlist_result(
  567. orderedSet(entries), post_id,
  568. '%s - %s' % (uploader, title) if uploader else title,
  569. description)