generic.py 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534
  1. # encoding: utf-8
  2. from __future__ import unicode_literals
  3. import os
  4. import re
  5. from .common import InfoExtractor
  6. from .youtube import YoutubeIE
  7. from ..utils import (
  8. compat_urllib_error,
  9. compat_urllib_parse,
  10. compat_urllib_request,
  11. compat_urlparse,
  12. compat_xml_parse_error,
  13. ExtractorError,
  14. HEADRequest,
  15. parse_xml,
  16. smuggle_url,
  17. unescapeHTML,
  18. unified_strdate,
  19. url_basename,
  20. )
  21. from .brightcove import BrightcoveIE
  22. from .ooyala import OoyalaIE
  23. from .rutv import RUTVIE
  24. class GenericIE(InfoExtractor):
  25. IE_DESC = 'Generic downloader that works on some sites'
  26. _VALID_URL = r'.*'
  27. IE_NAME = 'generic'
  28. _TESTS = [
  29. {
  30. 'url': 'http://www.hodiho.fr/2013/02/regis-plante-sa-jeep.html',
  31. 'file': '13601338388002.mp4',
  32. 'md5': '6e15c93721d7ec9e9ca3fdbf07982cfd',
  33. 'info_dict': {
  34. 'uploader': 'www.hodiho.fr',
  35. 'title': 'R\u00e9gis plante sa Jeep',
  36. }
  37. },
  38. # bandcamp page with custom domain
  39. {
  40. 'add_ie': ['Bandcamp'],
  41. 'url': 'http://bronyrock.com/track/the-pony-mash',
  42. 'file': '3235767654.mp3',
  43. 'info_dict': {
  44. 'title': 'The Pony Mash',
  45. 'uploader': 'M_Pallante',
  46. },
  47. 'skip': 'There is a limit of 200 free downloads / month for the test song',
  48. },
  49. # embedded brightcove video
  50. # it also tests brightcove videos that need to set the 'Referer' in the
  51. # http requests
  52. {
  53. 'add_ie': ['Brightcove'],
  54. 'url': 'http://www.bfmtv.com/video/bfmbusiness/cours-bourse/cours-bourse-l-analyse-technique-154522/',
  55. 'info_dict': {
  56. 'id': '2765128793001',
  57. 'ext': 'mp4',
  58. 'title': 'Le cours de bourse : l’analyse technique',
  59. 'description': 'md5:7e9ad046e968cb2d1114004aba466fd9',
  60. 'uploader': 'BFM BUSINESS',
  61. },
  62. 'params': {
  63. 'skip_download': True,
  64. },
  65. },
  66. {
  67. # https://github.com/rg3/youtube-dl/issues/2253
  68. 'url': 'http://bcove.me/i6nfkrc3',
  69. 'file': '3101154703001.mp4',
  70. 'md5': '0ba9446db037002366bab3b3eb30c88c',
  71. 'info_dict': {
  72. 'title': 'Still no power',
  73. 'uploader': 'thestar.com',
  74. 'description': 'Mississauga resident David Farmer is still out of power as a result of the ice storm a month ago. To keep the house warm, Farmer cuts wood from his property for a wood burning stove downstairs.',
  75. },
  76. 'add_ie': ['Brightcove'],
  77. },
  78. # Direct link to a video
  79. {
  80. 'url': 'http://media.w3.org/2010/05/sintel/trailer.mp4',
  81. 'md5': '67d406c2bcb6af27fa886f31aa934bbe',
  82. 'info_dict': {
  83. 'id': 'trailer',
  84. 'ext': 'mp4',
  85. 'title': 'trailer',
  86. 'upload_date': '20100513',
  87. }
  88. },
  89. # ooyala video
  90. {
  91. 'url': 'http://www.rollingstone.com/music/videos/norwegian-dj-cashmere-cat-goes-spartan-on-with-me-premiere-20131219',
  92. 'md5': '5644c6ca5d5782c1d0d350dad9bd840c',
  93. 'info_dict': {
  94. 'id': 'BwY2RxaTrTkslxOfcan0UCf0YqyvWysJ',
  95. 'ext': 'mp4',
  96. 'title': '2cc213299525360.mov', # that's what we get
  97. },
  98. },
  99. # google redirect
  100. {
  101. 'url': 'http://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&cad=rja&ved=0CCUQtwIwAA&url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DcmQHVoWB5FY&ei=F-sNU-LLCaXk4QT52ICQBQ&usg=AFQjCNEw4hL29zgOohLXvpJ-Bdh2bils1Q&bvm=bv.61965928,d.bGE',
  102. 'info_dict': {
  103. 'id': 'cmQHVoWB5FY',
  104. 'ext': 'mp4',
  105. 'upload_date': '20130224',
  106. 'uploader_id': 'TheVerge',
  107. 'description': 'Chris Ziegler takes a look at the Alcatel OneTouch Fire and the ZTE Open; two of the first Firefox OS handsets to be officially announced.',
  108. 'uploader': 'The Verge',
  109. 'title': 'First Firefox OS phones side-by-side',
  110. },
  111. 'params': {
  112. 'skip_download': False,
  113. }
  114. },
  115. # embed.ly video
  116. {
  117. 'url': 'http://www.tested.com/science/weird/460206-tested-grinding-coffee-2000-frames-second/',
  118. 'info_dict': {
  119. 'id': '9ODmcdjQcHQ',
  120. 'ext': 'mp4',
  121. 'title': 'Tested: Grinding Coffee at 2000 Frames Per Second',
  122. 'upload_date': '20140225',
  123. 'description': 'md5:06a40fbf30b220468f1e0957c0f558ff',
  124. 'uploader': 'Tested',
  125. 'uploader_id': 'testedcom',
  126. },
  127. # No need to test YoutubeIE here
  128. 'params': {
  129. 'skip_download': True,
  130. },
  131. },
  132. # funnyordie embed
  133. {
  134. 'url': 'http://www.theguardian.com/world/2014/mar/11/obama-zach-galifianakis-between-two-ferns',
  135. 'md5': '7cf780be104d40fea7bae52eed4a470e',
  136. 'info_dict': {
  137. 'id': '18e820ec3f',
  138. 'ext': 'mp4',
  139. 'title': 'Between Two Ferns with Zach Galifianakis: President Barack Obama',
  140. 'description': 'Episode 18: President Barack Obama sits down with Zach Galifianakis for his most memorable interview yet.',
  141. },
  142. },
  143. # RUTV embed
  144. {
  145. 'url': 'http://www.rg.ru/2014/03/15/reg-dfo/anklav-anons.html',
  146. 'info_dict': {
  147. 'id': '776940',
  148. 'ext': 'mp4',
  149. 'title': 'Охотское море стало целиком российским',
  150. 'description': 'md5:5ed62483b14663e2a95ebbe115eb8f43',
  151. },
  152. 'params': {
  153. # m3u8 download
  154. 'skip_download': True,
  155. },
  156. }
  157. ]
  158. def report_download_webpage(self, video_id):
  159. """Report webpage download."""
  160. if not self._downloader.params.get('test', False):
  161. self._downloader.report_warning('Falling back on generic information extractor.')
  162. super(GenericIE, self).report_download_webpage(video_id)
  163. def report_following_redirect(self, new_url):
  164. """Report information extraction."""
  165. self._downloader.to_screen('[redirect] Following redirect to %s' % new_url)
  166. def _send_head(self, url):
  167. """Check if it is a redirect, like url shorteners, in case return the new url."""
  168. class HEADRedirectHandler(compat_urllib_request.HTTPRedirectHandler):
  169. """
  170. Subclass the HTTPRedirectHandler to make it use our
  171. HEADRequest also on the redirected URL
  172. """
  173. def redirect_request(self, req, fp, code, msg, headers, newurl):
  174. if code in (301, 302, 303, 307):
  175. newurl = newurl.replace(' ', '%20')
  176. newheaders = dict((k,v) for k,v in req.headers.items()
  177. if k.lower() not in ("content-length", "content-type"))
  178. return HEADRequest(newurl,
  179. headers=newheaders,
  180. origin_req_host=req.get_origin_req_host(),
  181. unverifiable=True)
  182. else:
  183. raise compat_urllib_error.HTTPError(req.get_full_url(), code, msg, headers, fp)
  184. class HTTPMethodFallback(compat_urllib_request.BaseHandler):
  185. """
  186. Fallback to GET if HEAD is not allowed (405 HTTP error)
  187. """
  188. def http_error_405(self, req, fp, code, msg, headers):
  189. fp.read()
  190. fp.close()
  191. newheaders = dict((k,v) for k,v in req.headers.items()
  192. if k.lower() not in ("content-length", "content-type"))
  193. return self.parent.open(compat_urllib_request.Request(req.get_full_url(),
  194. headers=newheaders,
  195. origin_req_host=req.get_origin_req_host(),
  196. unverifiable=True))
  197. # Build our opener
  198. opener = compat_urllib_request.OpenerDirector()
  199. for handler in [compat_urllib_request.HTTPHandler, compat_urllib_request.HTTPDefaultErrorHandler,
  200. HTTPMethodFallback, HEADRedirectHandler,
  201. compat_urllib_request.HTTPErrorProcessor, compat_urllib_request.HTTPSHandler]:
  202. opener.add_handler(handler())
  203. response = opener.open(HEADRequest(url))
  204. if response is None:
  205. raise ExtractorError('Invalid URL protocol')
  206. return response
  207. def _extract_rss(self, url, video_id, doc):
  208. playlist_title = doc.find('./channel/title').text
  209. playlist_desc_el = doc.find('./channel/description')
  210. playlist_desc = None if playlist_desc_el is None else playlist_desc_el.text
  211. entries = [{
  212. '_type': 'url',
  213. 'url': e.find('link').text,
  214. 'title': e.find('title').text,
  215. } for e in doc.findall('./channel/item')]
  216. return {
  217. '_type': 'playlist',
  218. 'id': url,
  219. 'title': playlist_title,
  220. 'description': playlist_desc,
  221. 'entries': entries,
  222. }
  223. def _real_extract(self, url):
  224. parsed_url = compat_urlparse.urlparse(url)
  225. if not parsed_url.scheme:
  226. default_search = self._downloader.params.get('default_search')
  227. if default_search is None:
  228. default_search = 'auto'
  229. if default_search == 'auto':
  230. if '/' in url:
  231. self._downloader.report_warning('The url doesn\'t specify the protocol, trying with http')
  232. return self.url_result('http://' + url)
  233. else:
  234. return self.url_result('ytsearch:' + url)
  235. else:
  236. assert ':' in default_search
  237. return self.url_result(default_search + url)
  238. video_id = os.path.splitext(url.rstrip('/').split('/')[-1])[0]
  239. self.to_screen('%s: Requesting header' % video_id)
  240. try:
  241. response = self._send_head(url)
  242. # Check for redirect
  243. new_url = response.geturl()
  244. if url != new_url:
  245. self.report_following_redirect(new_url)
  246. return self.url_result(new_url)
  247. # Check for direct link to a video
  248. content_type = response.headers.get('Content-Type', '')
  249. m = re.match(r'^(?P<type>audio|video|application(?=/ogg$))/(?P<format_id>.+)$', content_type)
  250. if m:
  251. upload_date = response.headers.get('Last-Modified')
  252. if upload_date:
  253. upload_date = unified_strdate(upload_date)
  254. return {
  255. 'id': video_id,
  256. 'title': os.path.splitext(url_basename(url))[0],
  257. 'formats': [{
  258. 'format_id': m.group('format_id'),
  259. 'url': url,
  260. 'vcodec': 'none' if m.group('type') == 'audio' else None
  261. }],
  262. 'upload_date': upload_date,
  263. }
  264. except compat_urllib_error.HTTPError:
  265. # This may be a stupid server that doesn't like HEAD, our UA, or so
  266. pass
  267. try:
  268. webpage = self._download_webpage(url, video_id)
  269. except ValueError:
  270. # since this is the last-resort InfoExtractor, if
  271. # this error is thrown, it'll be thrown here
  272. raise ExtractorError('Failed to download URL: %s' % url)
  273. self.report_extraction(video_id)
  274. # Is it an RSS feed?
  275. try:
  276. doc = parse_xml(webpage)
  277. if doc.tag == 'rss':
  278. return self._extract_rss(url, video_id, doc)
  279. except compat_xml_parse_error:
  280. pass
  281. # it's tempting to parse this further, but you would
  282. # have to take into account all the variations like
  283. # Video Title - Site Name
  284. # Site Name | Video Title
  285. # Video Title - Tagline | Site Name
  286. # and so on and so forth; it's just not practical
  287. video_title = self._html_search_regex(
  288. r'(?s)<title>(.*?)</title>', webpage, 'video title',
  289. default='video')
  290. # video uploader is domain name
  291. video_uploader = self._search_regex(
  292. r'^(?:https?://)?([^/]*)/.*', url, 'video uploader')
  293. # Look for BrightCove:
  294. bc_urls = BrightcoveIE._extract_brightcove_urls(webpage)
  295. if bc_urls:
  296. self.to_screen('Brightcove video detected.')
  297. entries = [{
  298. '_type': 'url',
  299. 'url': smuggle_url(bc_url, {'Referer': url}),
  300. 'ie_key': 'Brightcove'
  301. } for bc_url in bc_urls]
  302. return {
  303. '_type': 'playlist',
  304. 'title': video_title,
  305. 'id': video_id,
  306. 'entries': entries,
  307. }
  308. # Look for embedded (iframe) Vimeo player
  309. mobj = re.search(
  310. r'<iframe[^>]+?src=(["\'])(?P<url>(?:https?:)?//player\.vimeo\.com/video/.+?)\1', webpage)
  311. if mobj:
  312. player_url = unescapeHTML(mobj.group('url'))
  313. surl = smuggle_url(player_url, {'Referer': url})
  314. return self.url_result(surl, 'Vimeo')
  315. # Look for embedded (swf embed) Vimeo player
  316. mobj = re.search(
  317. r'<embed[^>]+?src="(https?://(?:www\.)?vimeo\.com/moogaloop\.swf.+?)"', webpage)
  318. if mobj:
  319. return self.url_result(mobj.group(1), 'Vimeo')
  320. # Look for embedded YouTube player
  321. matches = re.findall(r'''(?x)
  322. (?:<iframe[^>]+?src=|embedSWF\(\s*)
  323. (["\'])(?P<url>(?:https?:)?//(?:www\.)?youtube\.com/
  324. (?:embed|v)/.+?)
  325. \1''', webpage)
  326. if matches:
  327. urlrs = [self.url_result(unescapeHTML(tuppl[1]), 'Youtube')
  328. for tuppl in matches]
  329. return self.playlist_result(
  330. urlrs, playlist_id=video_id, playlist_title=video_title)
  331. # Look for embedded Dailymotion player
  332. matches = re.findall(
  333. r'<iframe[^>]+?src=(["\'])(?P<url>(?:https?:)?//(?:www\.)?dailymotion\.com/embed/video/.+?)\1', webpage)
  334. if matches:
  335. urlrs = [self.url_result(unescapeHTML(tuppl[1]), 'Dailymotion')
  336. for tuppl in matches]
  337. return self.playlist_result(
  338. urlrs, playlist_id=video_id, playlist_title=video_title)
  339. # Look for embedded Wistia player
  340. match = re.search(
  341. r'<iframe[^>]+?src=(["\'])(?P<url>(?:https?:)?//(?:fast\.)?wistia\.net/embed/iframe/.+?)\1', webpage)
  342. if match:
  343. return {
  344. '_type': 'url_transparent',
  345. 'url': unescapeHTML(match.group('url')),
  346. 'ie_key': 'Wistia',
  347. 'uploader': video_uploader,
  348. 'title': video_title,
  349. 'id': video_id,
  350. }
  351. # Look for embedded blip.tv player
  352. mobj = re.search(r'<meta\s[^>]*https?://api\.blip\.tv/\w+/redirect/\w+/(\d+)', webpage)
  353. if mobj:
  354. return self.url_result('http://blip.tv/a/a-'+mobj.group(1), 'BlipTV')
  355. mobj = re.search(r'<(?:iframe|embed|object)\s[^>]*(https?://(?:\w+\.)?blip\.tv/(?:play/|api\.swf#)[a-zA-Z0-9]+)', webpage)
  356. if mobj:
  357. return self.url_result(mobj.group(1), 'BlipTV')
  358. # Look for Bandcamp pages with custom domain
  359. mobj = re.search(r'<meta property="og:url"[^>]*?content="(.*?bandcamp\.com.*?)"', webpage)
  360. if mobj is not None:
  361. burl = unescapeHTML(mobj.group(1))
  362. # Don't set the extractor because it can be a track url or an album
  363. return self.url_result(burl)
  364. # Look for embedded Vevo player
  365. mobj = re.search(
  366. r'<iframe[^>]+?src=(["\'])(?P<url>(?:https?:)?//(?:cache\.)?vevo\.com/.+?)\1', webpage)
  367. if mobj is not None:
  368. return self.url_result(mobj.group('url'))
  369. # Look for Ooyala videos
  370. mobj = re.search(r'player.ooyala.com/[^"?]+\?[^"]*?(?:embedCode|ec)=([^"&]+)', webpage)
  371. if mobj is not None:
  372. return OoyalaIE._build_url_result(mobj.group(1))
  373. # Look for Aparat videos
  374. mobj = re.search(r'<iframe src="(http://www\.aparat\.com/video/[^"]+)"', webpage)
  375. if mobj is not None:
  376. return self.url_result(mobj.group(1), 'Aparat')
  377. # Look for MPORA videos
  378. mobj = re.search(r'<iframe .*?src="(http://mpora\.(?:com|de)/videos/[^"]+)"', webpage)
  379. if mobj is not None:
  380. return self.url_result(mobj.group(1), 'Mpora')
  381. # Look for embedded NovaMov player
  382. mobj = re.search(
  383. r'<iframe[^>]+?src=(["\'])(?P<url>http://(?:(?:embed|www)\.)?novamov\.com/embed\.php.+?)\1', webpage)
  384. if mobj is not None:
  385. return self.url_result(mobj.group('url'), 'NovaMov')
  386. # Look for embedded NowVideo player
  387. mobj = re.search(
  388. r'<iframe[^>]+?src=(["\'])(?P<url>http://(?:(?:embed|www)\.)?nowvideo\.(?:ch|sx|eu)/embed\.php.+?)\1', webpage)
  389. if mobj is not None:
  390. return self.url_result(mobj.group('url'), 'NowVideo')
  391. # Look for embedded Facebook player
  392. mobj = re.search(
  393. r'<iframe[^>]+?src=(["\'])(?P<url>https://www\.facebook\.com/video/embed.+?)\1', webpage)
  394. if mobj is not None:
  395. return self.url_result(mobj.group('url'), 'Facebook')
  396. # Look for embedded VK player
  397. mobj = re.search(r'<iframe[^>]+?src=(["\'])(?P<url>https?://vk\.com/video_ext\.php.+?)\1', webpage)
  398. if mobj is not None:
  399. return self.url_result(mobj.group('url'), 'VK')
  400. # Look for embedded Huffington Post player
  401. mobj = re.search(
  402. r'<iframe[^>]+?src=(["\'])(?P<url>https?://embed\.live\.huffingtonpost\.com/.+?)\1', webpage)
  403. if mobj is not None:
  404. return self.url_result(mobj.group('url'), 'HuffPost')
  405. # Look for embed.ly
  406. mobj = re.search(r'class=["\']embedly-card["\'][^>]href=["\'](?P<url>[^"\']+)', webpage)
  407. if mobj is not None:
  408. return self.url_result(mobj.group('url'))
  409. mobj = re.search(r'class=["\']embedly-embed["\'][^>]src=["\'][^"\']*url=(?P<url>[^&]+)', webpage)
  410. if mobj is not None:
  411. return self.url_result(compat_urllib_parse.unquote(mobj.group('url')))
  412. # Look for funnyordie embed
  413. matches = re.findall(r'<iframe[^>]+?src="(https?://(?:www\.)?funnyordie\.com/embed/[^"]+)"', webpage)
  414. if matches:
  415. urlrs = [self.url_result(unescapeHTML(eurl), 'FunnyOrDie')
  416. for eurl in matches]
  417. return self.playlist_result(
  418. urlrs, playlist_id=video_id, playlist_title=video_title)
  419. # Look for embedded RUTV player
  420. rutv_url = RUTVIE._extract_url(webpage)
  421. if rutv_url:
  422. return self.url_result(rutv_url, 'RUTV')
  423. # Start with something easy: JW Player in SWFObject
  424. mobj = re.search(r'flashvars: [\'"](?:.*&)?file=(http[^\'"&]*)', webpage)
  425. if mobj is None:
  426. # Look for gorilla-vid style embedding
  427. mobj = re.search(r'(?s)(?:jw_plugins|JWPlayerOptions).*?file\s*:\s*["\'](.*?)["\']', webpage)
  428. if mobj is None:
  429. # Broaden the search a little bit
  430. mobj = re.search(r'[^A-Za-z0-9]?(?:file|source)=(http[^\'"&]*)', webpage)
  431. if mobj is None:
  432. # Broaden the search a little bit: JWPlayer JS loader
  433. mobj = re.search(r'[^A-Za-z0-9]?file["\']?:\s*["\'](http(?![^\'"]+\.[0-9]+[\'"])[^\'"]+)["\']', webpage)
  434. if mobj is None:
  435. # Try to find twitter cards info
  436. mobj = re.search(r'<meta (?:property|name)="twitter:player:stream" (?:content|value)="(.+?)"', webpage)
  437. if mobj is None:
  438. # We look for Open Graph info:
  439. # We have to match any number spaces between elements, some sites try to align them (eg.: statigr.am)
  440. m_video_type = re.search(r'<meta.*?property="og:video:type".*?content="video/(.*?)"', webpage)
  441. # We only look in og:video if the MIME type is a video, don't try if it's a Flash player:
  442. if m_video_type is not None:
  443. mobj = re.search(r'<meta.*?property="og:video".*?content="(.*?)"', webpage)
  444. if mobj is None:
  445. # HTML5 video
  446. mobj = re.search(r'<video[^<]*(?:>.*?<source.*?)? src="([^"]+)"', webpage, flags=re.DOTALL)
  447. if mobj is None:
  448. mobj = re.search(
  449. r'(?i)<meta\s+(?=(?:[a-z-]+="[^"]+"\s+)*http-equiv="refresh")'
  450. r'(?:[a-z-]+="[^"]+"\s+)*?content="[0-9]{,2};url=\'([^\']+)\'"',
  451. webpage)
  452. if mobj:
  453. new_url = mobj.group(1)
  454. self.report_following_redirect(new_url)
  455. return {
  456. '_type': 'url',
  457. 'url': new_url,
  458. }
  459. if mobj is None:
  460. raise ExtractorError('Unsupported URL: %s' % url)
  461. # It's possible that one of the regexes
  462. # matched, but returned an empty group:
  463. if mobj.group(1) is None:
  464. raise ExtractorError('Did not find a valid video URL at %s' % url)
  465. video_url = mobj.group(1)
  466. video_url = compat_urlparse.urljoin(url, video_url)
  467. video_id = compat_urllib_parse.unquote(os.path.basename(video_url))
  468. # Sometimes, jwplayer extraction will result in a YouTube URL
  469. if YoutubeIE.suitable(video_url):
  470. return self.url_result(video_url, 'Youtube')
  471. # here's a fun little line of code for you:
  472. video_id = os.path.splitext(video_id)[0]
  473. return {
  474. 'id': video_id,
  475. 'url': video_url,
  476. 'uploader': video_uploader,
  477. 'title': video_title,
  478. }