视频地址并不会直接写在网页的html文件中,我想会不会需要解析html中的脚本文件才能得到这些动态url,或者仅仅解析脚本还不够,还需要与服务器交互?还有,怎样解析网页中的脚本呢?用SpiderMonkey吗(我现在用的是C语言)?
--
您收到此邮件是因为您订阅了 “西电开源社区” 邮件列表。
要向此邮件列表发帖,请发送电子邮件至 xidian...@googlegroups.com。
要取消订阅,请发送电子邮件至 xidian_linux...@googlegroups.com。
请通过 https://groups.google.com/group/xidian_linux?hl=zh-CN 访问此网上论坛。
通过 教育网: http://xdlinux.info/ (ipv6 enabled)
教育网及外网:http://linux.xidian.edu.cn/ (ipv4)
手机:http://m.xdlinux.info/
访问西电开源社区。
<script type="text/javascript"> // the Youku object var Youku = (Youku || {}); // configurable variables Youku._IsHtml5 = (Youku._IsHtml5 || false); Youku._Player = "http://static.youku.com/v/swf/qplayer.swf"; Youku._LivePlayer = "http://static.youku.com/v/swf/livePlayer.swf"; Youku._ApiPlayer = "http://player.youku.com/player.php"; Youku._ExpressInstall = "http://events.youku.com/global/flashes/expressInstall.swf"; Youku._VideoThumb = "http://events.youku.com/global/api/video-thumb.php"; // load the Youku Player Youku.loadLivePlayer = function(channel, divName, playerWidth, playerHeight) { channel = (channel || "101"); divName = (divName || "live_player"); playerWidth = (playerWidth || 600); playerHeight = (playerHeight || 450); var flashPlayerDiv = "flash_live_player_" + String(Math.random()).substr(2, 5); var hId = document.getElementById(divName); //alert(hId.innerHTML); hId.innerHTML=('<div id="' + flashPlayerDiv + '"></div>'); var flashParams = {"quality": "high", "allowScriptAccess": "always", "allowFullScreen": "true", "bgcolor": "#000000"}; var flashVars = {"reconnects": 3, "channel": channel, "autoplay": 1, "showfrontad": 0, "dragback": 0}; swfobject.embedSWF(Youku._LivePlayer, flashPlayerDiv, playerWidth, playerHeight, "9.0.0", Youku._ExpressInstall, flashVars, flashParams); }; Youku.loadPlayer = function(videoId, divName, playerWidth, playerHeight, autoPlay, imgLogo, fullToolbar) { videoId = (videoId || ""); divName = (divName || "youku_player"); playerWidth = (playerWidth || 400); playerHeight = (playerHeight || 315); autoPlay = (autoPlay ? "true" : "false"); imgLogo = (imgLogo || ""); fullToolbar = (fullToolbar ? true : true); var flashPlayerDiv = "flash_youku_player_" + String(Math.random()).substr(2, 5); var hId = document.getElementById(divName); hId.innerHTML=('<div id="' + flashPlayerDiv + '"></div>'); var flashParams = {"quality": "high", "allowScriptAccess": "always", "allowFullScreen": "true", "bgcolor": "#FFFFFF", "wmode": "transparent"}; var flashVars = {"winType": "index", "isShowRelatedVideo": "false", "isAutoPlay": autoPlay, "isLoop": "false", "UserID": "0", "VideoIDS": videoId}; if (imgLogo != "") { flashVars.imglogo = imgLogo; } if (fullToolbar) { flashVars.winType = "interior"; } swfobject.embedSWF(Youku._Player, flashPlayerDiv, playerWidth, playerHeight, "9.0.0", Youku._ExpressInstall, flashVars, flashParams); }; Youku.loadFullPlayer = function(videoId, divName, playerWidth, playerHeight, autoPlay, imgLogo) { playerWidth = (playerWidth || 400); playerHeight = (playerHeight || 340); Youku.loadPlayer(videoId, divName, playerWidth, playerHeight, autoPlay, imgLogo, true); }; if((/(iPhone|iPad|iPod)/i.test(navigator.userAgent))){ //var a = '<a href="http://v.youku.com/v_show/id_XMzY5NzcxOTI4.html" target="_blank"><img src="http://res.mfs.ykimg.com/051000004F61A5C097927308FA0D4E36.jpg" /></a>'; var a = '<a href="http://v.youku.com/v_show/id_XMzY5NzcxOTI4.html" target="_blank"><img src="http://res.mfs.ykimg.com/051000004F61A5C097927308FA0D4E36.jpg" /></a>'; var player = document.getElementById("player"); player.innerHTML=a; }else{ Youku.loadPlayer ("XMzY5NzcxOTI4", "player", 580, 367, true); } </script>
--
--
您收到此邮件是因为您订阅了 “西电开源社区” 邮件列表。
要向此邮件列表发帖,请发送电子邮件至 xidian...@googlegroups.com。
要取消订阅,请发送电子邮件至 xidian_linux...@googlegroups.com。
请通过 https://groups.google.com/group/xidian_linux?hl=zh-CN 访问此网上论坛。
通过 教育网: http://xdlinux.info/ (ipv6 enabled)
教育网及外网:http://linux.xidian.edu.cn/ (ipv4)
手机:http://m.xdlinux.info/
访问西电开源社区。
-- |
= = = = = = = = = = = = = = = = = = = = = =
话说一直挺想知道傲游浏览器是怎么搞定flv的
send from android
down them all 也可以
跑题了跑题了 楼主想问的是原理啊
send from android
HTTP/1.1 302 Found Expires: -1 Cache-Control: private, max-age=0 Pragma: no-cache Location: http://61.158.246.49/youku/6976B548EE0388235D9B344835/03000801004F70A3411ADC009500885571FCCB-54EA-039F-D698-D3BCFEF98B66.mp4 Content-type: text/html Content-Length: 0 Date: Tue, 27 Mar 2012 11:00:40 GMT Server: F_LIGHTY_TJ6
00000000: 7a 01 00 00 02 08 00 00 f7 01 b2 af cd 1a 2e 00 z............... 00000010: af 8a b2 af cd 1a 2e 00 3d 01 00 00 48 54 54 50 ........=...HTTP 00000020: 2f 31 2e 31 20 33 30 32 20 46 6f 75 6e 64 00 45 /1.1 302 Found.E 00000030: 78 70 69 72 65 73 3a 20 2d 31 00 43 61 63 68 65 xpires: -1.Cache 00000040: 2d 43 6f 6e 74 72 6f 6c 3a 20 70 72 69 76 61 74 -Control: privat 00000050: 65 2c 20 6d 61 78 2d 61 67 65 3d 30 00 50 72 61 e, max-age=0.Pra 00000060: 67 6d 61 3a 20 6e 6f 2d 63 61 63 68 65 00 4c 6f gma: no-cache.Lo 00000070: 63 61 74 69 6f 6e 3a 20 68 74 74 70 3a 2f 2f 36 cation: http://6 00000080: 31 2e 31 35 38 2e 32 34 36 2e 34 39 2f 79 6f 75 1.158.246.49/you 00000090: 6b 75 2f 36 39 37 36 42 35 34 38 45 45 30 33 38 ku/6976B548EE038 000000a0: 38 32 33 35 44 39 42 33 34 34 38 33 35 2f 30 33 8235D9B344835/03 000000b0: 30 30 30 38 30 31 30 30 34 46 37 30 41 33 34 31 000801004F70A341 000000c0: 31 41 44 43 30 30 39 35 30 30 38 38 35 35 37 31 1ADC009500885571 000000d0: 46 43 43 42 2d 35 34 45 41 2d 30 33 39 46 2d 44 FCCB-54EA-039F-D 000000e0: 36 39 38 2d 44 33 42 43 46 45 46 39 38 42 36 36 698-D3BCFEF98B66 000000f0: 2e 6d 70 34 00 43 6f 6e 74 65 6e 74 2d 74 79 70 .mp4.Content-typ 00000100: 65 3a 20 74 65 78 74 2f 68 74 6d 6c 00 43 6f 6e e: text/html.Con 00000110: 74 65 6e 74 2d 4c 65 6e 67 74 68 3a 20 30 00 44 tent-Length: 0.D 00000120: 61 74 65 3a 20 54 75 65 2c 20 32 37 20 4d 61 72 ate: Tue, 27 Mar 00000130: 20 32 30 31 32 20 31 31 3a 30 30 3a 34 30 20 47 2012 11:00:40 G 00000140: 4d 54 00 53 65 72 76 65 72 3a 20 46 5f 4c 49 47 MT.Server: F_LIG 00000150: 48 54 59 5f 54 4a 36 00 00 00 00 00 6a 0f c7 a5 HTY_TJ6.....j... 00000160: 4c 46 9f d5 1b 3d cb a1 c9 25 b7 75 0c 00 00 00 LF...=...%.u.... 00000170: 36 30 2e 32 38 2e 31 32 36 2e 33 36 50 00 60.28.126.36P.
http://f.youku.com/player/getFlvPath/sid/133284604637113718303_00/st/mp4/fileid/03000801004F70A3411ADC009500885571FCCB-54EA-039F-D698-D3BCFEF98B66?K=3636a0a1a4bb58bc28278b9d&hd=1&myp=0&ts=105
HTTP/1.1 302 Found Exepires: -1Cache-Control: private, max-age=0 Pragma: no-cach Location: http://61.158.246.49/youku/6976B548EE0388235D9B344835/03000801004F70A3411ADC009500885571FCCB-54EA-039F-D698-D3BCFEF98B66.mp4 Content-type: text/html Content-Length: 0 Date: Tue, 27 Mar 2012 11:00:40 GMT Server: F_LIGHTY_TJ6