Changeset 37418
- Timestamp:
- 05/08/10 01:48:18 (3 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
lang/javascript/vimperator-plugins/trunk/stella.js
r37407 r37418 1008 1008 1009 1009 fetch: function (filepath) { 1010 function _fetch (id, t) { 1011 let url = 1012 "http://youtube.com/get_video?video_id=" + id + 1013 "&t=" + decodeURIComponent(t) + 1014 (quality ? "&fmt=" + quality : ''); 1015 U.download(url, filepath, '.flv', self.title); 1016 } 1017 1010 1018 let self = this; 1019 let id = YouTubePlayer.getIDfromURL(U.currentURL); 1011 1020 1012 1021 // all(1080p,720p,480p,360p) -> 37, 22, 35, 34, 5 1013 1022 // FIXME 一番初めが最高画質だと期待 1014 let quality = content.wrappedJSObject.yt.config_.SWF_CONFIG.args.fmt_map.match(/^\d+/); 1023 let cargs = content.wrappedJSObject.yt.config_.SWF_CONFIG.args 1024 let quality = cargs.fmt_map.match(/^\d+/); 1025 let t = cargs.t; 1026 1027 // 時間が経っていると無効化されてしまっている 1028 //_fetch(t, id); 1015 1029 1016 1030 U.httpRequest( … … 1020 1034 // XXX t が変わるために、キャッシュを利用できない問題アリアリアリアリ 1021 1035 let [, t] = xhr.responseText.match(/swfHTML.*&t=([^&]+)/); 1022 let id = YouTubePlayer.getIDfromURL(U.currentURL); 1023 let url = 1024 "http://youtube.com/get_video?video_id=" + id + 1025 "&t=" + decodeURIComponent(t) + 1026 (quality ? "&fmt=" + quality : ''); 1027 U.download(url, filepath, '.flv', self.title); 1036 _fetch(id, t); 1028 1037 } 1029 1038 );
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)