首页 新闻 会员 周边 捐助

请教读取网页源码的问题

0
悬赏园豆:50 [已解决问题] 解决于 2019-08-20 08:54
<script type="text/javascript" src="base-pages/js/changeHeight.js"></script>
<script type="text/javascript" src="base-pages/js/roomHeight.js"></script>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>avi</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<style type="text/css">
<!--

.z{

background-image:url(images/m-bg.jpg);background-repeat:no-repeat;;
padding:20px; 
}
.STYLE2 {
padding:10px; 
color: #9F0018;
font-weight: bold;
font-size: 14px;
}

-->
</style>
<script language="javascript">
var currentposit='5';
var CurrentPosition=0;
var playofEnd=0;
function stopPlay(){
document.MediaPlayer.Pause();
}
function continuePlay(){
document.MediaPlayer.Play();
}
function PositionChange(dblNewPosition){
//alert(dblNewPosition);
//document.MediaPlayer.Seeking(dblNewPosition);
document.MediaPlayer.CurrentPosition=dblNewPosition;
}
function currentPosition(){

CurrentPosition=document.MediaPlayer.CurrentPosition;
//alert("isAvailable:"+document.MediaPlayer.isAvailable("CurrentPosition"));
/*var temp='5';
alert(CurrentPosition+":"+temp);
if(CurrentPosition<temp){
alert("buffering~!!");
document.MediaPlayer.Pause();
document.MediaPlayer.Buffering(true);
}*/

}
setInterval("currentPosition()",3000);

function resize(){
var rate=1.34;
document.getElementById("MediaPlayer").height=parent.frames['resPlay'].document.body.clientHeight-145;
document.getElementById("MediaPlayer").width=(parent.frames['resPlay'].document.body.clientHeight-145)*rate;

if(document.getElementById("MediaPlayer").height<400){
document.getElementById("MediaPlayer").width=600;
document.getElementById("MediaPlayer").height=420;
}

}
function showPlayWay(){
var showFlag='0';
if(showFlag=='1'){
document.MediaPlayer.Stop();;
var flag=window.showModalDialog('codsrv!IsPlayWay.action','','dialogWidth:1024px;dialogHeight:900px;dialogLeft:10px;dialogTop:10px;help:no',window);

document.MediaPlayer.Play();
if(flag==1){
setTimeout("PositionChange(currentposit)",500);
}else{ 
PositionChange(0);
}
}
}
//请等待
document.write('<div id="doing" style="position: absolute; background: #f2f2f2; color:#f00; border: solid 3px #CCC; width: 300px; height: 100px; left: 30%; top: 30%;"><table align="center"><tr><td>&nbsp;&nbsp;</td></tr><tr><td >请等待。。。</td></tr><tr><td align="center"><img src="common-images/resource/loader.gif" width="32" height="32" ></td></tr></table></div>');
</script>
<script language="javascript" for="MediaPlayer" event="EndOfStream()" >
playofEnd=1;

</script>

</head>
<body onresize="resize();" >


<table width="100%" border="0" cellspacing="0" cellpadding="0" >
<tr>
<td align="center" class="STYLE2" >正在播放 </td>
</tr>
<tr>
<td align="center" valign="middle" id="vga" colspan="2">
<object classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95" id="MediaPlayer" width="700" height="528" >
<param name="ShowControls" value="true">
<param name="EnablePositionControls" value="true"> 
<param name="Ena bleFullScreenControls" value="true"> 
<param name="EnableTracker" value="0"> 
<param name="AutoRewind" value="true"> 
<param name="ShowStatusBar" value="true"> 
<param name="BufferingTime" value="15000"> 
<param name="ShowPositionControls" value="true"> 
<param name="AutoStart" value="true"> 
<param name="CanSeek" value="true"> 
<param name="SRC" value="http://*****.cn:80//uploads//%E4%BA%A7%E5%93%81%E5%8F%8A%E6%96%B9%E6%A1%88%E8%83%BD%E5%8A%9B/%E4%B8%93%E4%B8%9A%E5%AE%9E%E6%96%BD/U8/1ACGGL12004%E9%87%87%E8%B4%AD%E4%BB%B7%E6%A0%BC%E7%AE%A1%E7%90%86.wmv">
</object>
</td>
</tr>
</table>
</body>
</html>
<script language="javascript">
//var currentposit='5';
setTimeout("PositionChange(currentposit)",1000);
</script>

 

 

上面是IE中F12查看到的源码,其中有个视频*.wmv,这个是我想要的内容

 

1 SHDocVw.ShellWindows shellWindows = new SHDocVw.ShellWindowsClass();
2 
3 foreach (SHDocVw.InternetExplorer iw in shellWindows)
4 {
5 mshtml.HTMLDocumentClass doc = (mshtml.HTMLDocumentClass)iw.Document;
6 mshtml.HTMLBody body = (mshtml.HTMLBody)doc.body;
7 string html = body.innerHTML.ToString();
8 
9 mshtml.IHTMLElement img = (mshtml.IHTMLElement)doc.all.item("MediaPlayer", 0);

 

以上是我读源码的代码,但是img我取到的一直是NULL,有老师知道要怎么处理吗?

问题补充:

我现在取到的body内容如下,没有MediaPlayer这个元素

 

<iframe name="resPlay" width="100%" height="100%" id="resPlay" src="codsrv!showResPlay.action?recordTime=0&amp;playWay=null&amp;playURL=http://***.cn:80&amp;playType=aviPlayer.jsp&amp;Res_Guid=1787df082c66487f8a93f652d300a6a4&amp;IA_COURSE_GUID=5f5eb9aa6dcc48e9b299d1488eddcb2c&amp;IA_CHAPTER_GUID=577ee797cba04eec87bd451a47db1518&amp;IA_MATERIAL_GUID=f36eced116ad4bbf836329a3f3b790d1" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" style="-ms-overflow-x: hidden;" allowtransparency="true">
</iframe> 

<div id="iactive_pan_floater" style="left: 2px; width: 63px; height: auto; bottom: 5px; overflow: hidden; visibility: visible; position: absolute; z-index: 100;">
<iframe id="bgLayer" src="about:blank" frameborder="0" style="left: 0px; top: 0px; width: 100%; height: auto; position: absolute; z-index: -1; scrolling: no;"></iframe>
<table width="63" border="0" cellspacing="0" cellpadding="0">
<tbody><tr>
<td width="51" height="44" background="base-pages/float_images/top.gif" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tbody><tr>
<td height="18"></td>
</tr>
<tr>
<td align="center" valign="middle"><img align="absmiddle" src="base-pages/float_images/logo.gif"></td>
</tr>
</tbody></table></td>
<td><img width="12" height="44" style="cursor: hand;" onclick="iactive_pan_close()" src="base-pages/float_images/top_gb.gif"></td>
</tr>
</tbody></table>
<table width="63" border="0" cellspacing="0" cellpadding="0">
<tbody><tr>
<td><img width="63" height="19" src="base-pages/float_images/top_bg.gif"></td>
</tr>
</tbody></table>
<table width="63" border="0" cellspacing="0" cellpadding="0">
<tbody><tr>
<td width="6" background="base-pages/float_images/left_bg.gif"></td>
<td width="51" align="left" valign="middle" bgcolor="#ffffff">
<!-- recept code -->
<table width="100%" class="group" bgcolor="#ffffff" border="0" cellspacing="0" cellpadding="4">
<tbody><tr>

<td height="20" align="center" valign="middle">
<a title="做笔记" class="iavtive_pan_userlink" style="font-size: 12px;" href="javascript:resNote('1787df082c66487f8a93f652d300a6a4','5f5eb9aa6dcc48e9b299d1488eddcb2c');">笔记</a></td>
</tr>
<tr>
<td height="20" align="center" valign="middle">
<a title="提问题" class="iavtive_pan_userlink" style="font-size: 12px;" href="javascript:ResFAQ('知识答疑','resource!resFAQ.action?opentype=window&amp;R_RES_GUID=1787df082c66487f8a93f652d300a6a4&amp;R_RES_NAME=管理V12.0&amp;R_FAQ_COURSE_GUID=5f5eb9aa6dcc48e9b299d1488eddcb2c');">问题</a>
</td>
</tr>
<tr>
<td height="20" align="center" valign="middle">
<a title="评价" class="iavtive_pan_userlink" style="font-size: 12px;" href="javascript:resComment('codsrv!commentRes.action?R_RES_GUID=1787df082c66487f8a93f652d300a6a4&amp;R_RES_NAME=管理V12.0&amp;R_RESCM_PK_COURSE_GUID=5f5eb9aa6dcc48e9b299d1488eddcb2c');">评价</a>
</td>
</tr>
</tbody></table>
<!-- --> </td>
<td width="6" background="base-pages/float_images/right_bg.gif"></td>
</tr>
</tbody></table>
<table width="63" border="0" cellspacing="0" cellpadding="0">
<tbody><tr>
<td><img width="63" height="4" src="base-pages/float_images/bottom_02.gif"></td>
</tr>
</tbody></table>
<!-- 800IM Homepage -->
<table width="63" align="center" border="0" cellspacing="0" cellpadding="0">
<tbody><tr>
<td valign="middle">
<img width="63" height="4" src="base-pages/float_images/bottom.gif" border="0"></td>
</tr>
</tbody></table>

</div>

<!-- Show recepr panel -->
<div id="iactive_pan_show" style="left: 2px; top: 3px; width: 23px; height: 69px; visibility: hidden; position: absolute; z-index: 37;">
<img style="cursor: hand;" onclick="iactive_pan_open()" src="base-pages/float_images/btn_show.gif" border="0">
</div>

<script>
function iactive_pan_getCookie(name){var str;var cookieString = new String(document.cookie);var cookieHeader = name+"=" ;var beginPosition = cookieString.indexOf(cookieHeader); cookieString=cookieString.substring(beginPosition);var endPosition=cookieString.indexOf(";"); if (beginPosition != -1){ if(endPosition==-1){endPosition=cookieString.length;}str=cookieString.substring(cookieHeader.length,endPosition); } else {str=''; } return str;}

function iactive_pan_writeCookie(name, value, hours) { var expire = ""; if(hours != null) { expire = new Date((new Date()).getTime() + hours * 3600000);expire = "; expires=" + expire.toGMTString(); } document.cookie = name + "=" + value + expire;} var guid=iactive_pan_getCookie('machineID');if(guid.length==0){ iactive_pan_writeCookie("machineID","2832328654",24*365);} guid=iactive_pan_getCookie('machineID');var webRef=iactive_pan_getCookie('webRef');var iactive_pan_NS = (document.layers) ? 1 : 0;var iactive_pan_IE = (document.all) ? 1: 0;

function __rol_GetScrollTop()
{
var ret=0;
if (window.pageYOffset){
ret = window.pageYOffset;
}else if (document.documentElement && document.documentElement.scrollTop) 
{ret = document.documentElement.scrollTop;
}else if(document.body){
ret = document.body.scrollTop;
} 
return ret;
}

function __rol_GetScrollLeft()
{
var ret=0;
if (window.pageXOffset){
ret = window.pageXOffset;
}else if (document.documentElement && document.documentElement.scrollLeft){
ret = document.documentElement.scrollLeft;
}else if(document.body){
ret = document.body.scrollLeft;
}
return ret;
}

function __rol_GetClientWidth()
{
var ret=0;
if (window.innerWidth){
ret = window.innerWidth;
}else if (document.documentElement && document.documentElement.clientWidth){
ret = document.documentElement.clientWidth;
}else if (document.body){
ret = document.body.clientWidth;
}
return ret;
}

function __rol_GetClientHeight()
{
var ret=0;
if (window.innerHeight){
ret = window.innerHeight;
}else if (document.documentElement && document.documentElement.clientHeight){
ret = document.documentElement.clientHeight;
}else if (document.body){
ret = document.body.clientHeight;
}
return ret;
}

function __rol_GetOSX()
{
if(navigator.userAgent.indexOf('MSIE')>0)
return 'ie'; 
if(navigator.userAgent.indexOf('Firefox')>0)
return 'ff'; 
return 'ie';
}
var __rol_os = '';

function __rol_GetOS()
{
if (__rol_os == '') 
__rol_os = __rol_GetOSX(); 
return __rol_os;
}

function __rol_GetStyleLeft(obj)
{
if (__rol_GetOS()=='ie') 
return parseInt(obj.style.posLeft);
if (__rol_GetOS()=='ff') 
return parseInt(obj.style.left); 
return parseInt(obj.style.posLeft);
}

function __rol_GetStyleTop(obj)
{
if (__rol_GetOS()=='ie') 
return parseInt(obj.style.posTop);
if (__rol_GetOS()=='ff') 
return parseInt(obj.style.top); 
return parseInt(obj.style.posTop);
}

function __rol_GetStyleWidth(obj)
{
if (__rol_GetOS()=='ie') 
return parseInt(obj.style.posWidth);
if (__rol_GetOS()=='ff') 
return parseInt(obj.style.width); 
return parseInt(obj.style.posWidth);
}

function __rol_GetStyleHeight(obj)
{
if (__rol_GetOS()=='ie') 
return parseInt(obj.style.posHeight);
if (__rol_GetOS()=='ff') 
return parseInt(obj.style.height); 
return parseInt(obj.style.posHeight);
}

function __rol_SetStyleLeft(obj, x)
{
if (__rol_GetOS()=='ie') {
obj.style.posLeft=x;
} else if (__rol_GetOS()=='ff') {
obj.style.left=x+'px';
} else{
obj.style.posLeft=x;
}
}

function __rol_SetStyleTop(obj, x)
{
if (__rol_GetOS()=='ie') {
obj.style.posTop=x;
} else if (__rol_GetOS()=='ff') {
obj.style.top=x+'px';
} else{
obj.style.posTop=x;
}
}
function __rol_SetStyleBottom(obj, x)
{
if (__rol_GetOS()=='ie') {
obj.style.posBottom=x;
} else if (__rol_GetOS()=='ff') {
obj.style.bottom=x+'px';
} else{
obj.style.posBottom=x;
}
}
function __rol_SetStyleWidth(obj, x)
{
if (__rol_GetOS()=='ie') {
obj.style.posWidth=x;
} else if (__rol_GetOS()=='ff') {
obj.style.width=x+'px';
} else{
obj.style.posWidth=x;
}
}

function __rol_SetStyleHeight(obj, x)
{
if (__rol_GetOS()=='ie') {
obj.style.posHeight=x;
} else if (__rol_GetOS()=='ff') {
obj.style.height=x+'px';
} else{
obj.style.posHeight=x;
}
}

function __MM_findObj(n, d)
{
var p,i,x; 
if(!d) d=document; 
if((p=n.indexOf('?'))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);
}
if(!(x=d[n])&&d.all) x=d.all[n]; 
for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) 
x=__MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) 
x=d.getElementById(n);
return x;
}

function getElementPositionX(elemID)
{
var offsetTrail = __MM_findObj(elemID);
var offsetLeft = 0; 
while(offsetTrail){
offsetLeft += offsetTrail.offsetLeft;
offsetTrail = offsetTrail.offsetParent;
} 
return offsetLeft;
}

function getElementPositionY(elemID)
{
var offsetTrail = __MM_findObj(elemID);
var offsetTop = 0; 
while(offsetTrail){
offsetTop += offsetTrail.offsetTop;
offsetTrail = offsetTrail.offsetParent;
}
return offsetTop;
}
var iactive_pan_leftPos=eval(screen.Width-560)/2;
var iactive_pan_topPos=eval(screen.Height-470)/2;
var __rol_panel = document.getElementById('iactive_pan_floater');
var __rol_show = document.getElementById('iactive_pan_show');
var __rol_adcall_div = document.getElementById('iactive_adcall_div');
var __rol_adcall_ad_div = document.getElementById('iactive_adcall_ad_div');
var __rol_adv_tv = document.getElementById('iactive_adv_tv');
var __rol_adv_tv_div = document.getElementById('iactive_adv_tv_div');
var __rol_adv_tv_all_div = document.getElementById('iactive_adv_tv_all_div');
var __rol_adv_tv_show_div = document.getElementById('iactive_adv_tv_show_div');
var __rol_adv_tv_hide_div = document.getElementById('iactive_adv_tv_hide_div');
var __rol_adv_tv_popup = document.getElementById('iactive_adv_tv_popup');
var __rol_adv_tv_popup_div = document.getElementById('iactive_adv_tv_popup_div');
var iactive_adv_text_div = document.getElementById('iactive_adv_text_div');
var iactive_adv_scrolllayer = document.getElementById('iactive_adv_scrolllayer');
var iactive_adv_stopscroll = false; 
var iactive_adv_preTop = 0; 
var iactive_adv_currentTop = 0; 
var iactive_adv_stoptime = 0;
if (__rol_adcall_ad_div) __rol_adcall_ad_div.style.display='none';
if (__rol_adv_tv_div) __rol_adv_tv_div.style.display='none';
if (iactive_adv_text_div) iactive_adv_text_div.style.display='none';

function __rol_adcall()
{
window.open('http://rol.liveuc.net/rol/dbcall?cmdid=50&orgID=1032','','Width=413px,height=326px,left='+iactive_pan_leftPos+'px,top='+iactive_pan_topPos+'px,location=0,statusbar=0,menubar=0,directories=no,scrollbars=no,resizable=no,help=no,toolbar=no');
}
var __rol_tv_url='http://rol.liveuc.net/rol/images/_aliveuc_/index.html?adminRegname=china';
if (__rol_adv_tv_div && __rol_adv_tv_div.style.display=='') 
__rol_open_tv();

function __rol_open_tv()
{
__rol_adv_tv.src=__rol_tv_url;
__rol_adv_tv_div.style.display='';
if(__rol_adv_tv_hide_div)
__rol_adv_tv_hide_div.style.display='';
if(__rol_adv_tv_show_div)
__rol_adv_tv_show_div.style.display='none';
}

function __rol_close_tv()
{
__rol_adv_tv.src='';
__rol_adv_tv_popup.src='';
__rol_adv_tv_popup_div.style.visibility='hidden';
__rol_adv_tv_div.style.display='none';
if(__rol_adv_tv_hide_div)
__rol_adv_tv_hide_div.style.display='none';
if(__rol_adv_tv_show_div)
__rol_adv_tv_show_div.style.display='';
}

function __rol_open_tv_popup()
{
__rol_adv_tv.src='';
__rol_adv_tv_popup.src=__rol_tv_url;
__rol_adv_tv_popup_div.style.visibility='visible';
__rol_initpos_tv_popup();
}

function __rol_close_tv_popup()
{
__rol_adv_tv.src=__rol_tv_url;
__rol_adv_tv_popup.src='';
__rol_adv_tv_popup_div.style.visibility='hidden';
}

function __rol_initpos_tv_popup()
{
__rol_SetStyleTop(__rol_adv_tv_popup_div, getElementPositionY('iactive_adv_tv'));
if(__rol_GetStyleTop(__rol_adv_tv_popup_div)+__rol_GetStyleHeight(__rol_adv_tv_popup_div)>__rol_GetScrollTop()+__rol_GetClientHeight()) 
__rol_SetStyleTop(__rol_adv_tv_popup_div,__rol_GetScrollTop()+__rol_GetClientHeight()-__rol_GetStyleHeight(__rol_adv_tv_popup_div));
__rol_SetStyleLeft(__rol_adv_tv_popup_div, __rol_GetStyleLeft(__rol_panel)-__rol_GetStyleWidth(__rol_adv_tv_popup_div)+20);
}

function iactive_adv_init_srolltext()
{
iactive_adv_scrolllayer.onmouseover = new Function('iactive_adv_stopscroll = true');
iactive_adv_scrolllayer.onmouseout = new Function('iactive_adv_stopscroll = false');
iactive_adv_scrolllayer.appendChild(iactive_adv_scrollmessage.cloneNode(true));
iactive_adv_scrolllayer.scrollTop = 0; setInterval('iactive_adv_scrollUp()', 15);
}

function iactive_adv_scrollUp()
{
if(iactive_adv_stopscroll) 
return;
iactive_adv_currentTop += 1;
if(iactive_adv_currentTop == __rol_GetStyleHeight(iactive_adv_scrolllayer)+1) {
iactive_adv_stoptime += 1;
iactive_adv_currentTop -= 1;
if(iactive_adv_stoptime == 220) {
iactive_adv_currentTop = 0;
iactive_adv_stoptime = 0;
}
}else{
iactive_adv_preTop = iactive_adv_scrolllayer.scrollTop;
iactive_adv_scrolllayer.scrollTop += 1;
if(iactive_adv_preTop == iactive_adv_scrolllayer.scrollTop){
iactive_adv_scrolllayer.scrollTop = 0; 
iactive_adv_scrolllayer.scrollTop += 1; 
} 
} 
}

if (iactive_adv_scrolllayer) 
iactive_adv_init_srolltext();

function iactive_pan_close()
{
__rol_panel.style.visibility='hidden';
__rol_show.style.visibility='visible';
if(__rol_adv_tv) __rol_close_tv();
}

function iactive_pan_open()
{
__rol_panel.style.visibility='visible';
__rol_show.style.visibility='hidden'; 
if(__rol_adv_tv) 
__rol_open_tv();
}
var iactive_is_first=0;
var iactive_pre_width=0;
var iactive_now_width=0;
var iactive_pan_lastScrollX=0;

function iactive_pan_init()
{
iactive_pan_lastScrollX = 0;
iactive_pre_width=__rol_GetClientWidth();
iactive_pan_lastScrollX=2;
iactive_pan_lastScrollX2 = __rol_GetStyleWidth(__rol_panel)-__rol_GetClientWidth();
__rol_SetStyleLeft(__rol_panel, __rol_GetStyleLeft(__rol_panel)-iactive_pan_lastScrollX2);
}

//__rol_SetStyleTop(__rol_panel,200);
__rol_SetStyleBottom(__rol_panel,5);
iactive_pan_lastScrollY = 0;

function iactive_pan_heartBeat() 
{
if(iactive_is_first==0) 
iactive_is_first=1;
if(iactive_is_first==1){
iactive_pan_init();
iactive_is_first=2;
}
iactive_now_width=__rol_GetClientWidth();
if(iactive_now_width!=iactive_pre_width){
iactive_pan_lastScrollX=iactive_pan_lastScrollX+(iactive_pre_width-iactive_now_width);
iactive_pre_width=iactive_now_width;
}
var topPosNow = __rol_GetStyleTop(__rol_panel)-__rol_GetScrollTop();
if(__rol_GetScrollTop() != iactive_pan_lastScrollY && (__rol_GetClientHeight()>__rol_panel.clientHeight+topPosNow || topPosNow>200)) {percent = 0.1*(__rol_GetScrollTop() - iactive_pan_lastScrollY);
if(percent > 0) {
percent = Math.ceil(percent);
}else percent = Math.floor(percent);
__rol_SetStyleTop(__rol_panel, __rol_GetStyleTop(__rol_panel)+percent);
iactive_pan_lastScrollY = iactive_pan_lastScrollY + percent;
}
if(__rol_GetScrollLeft() != iactive_pan_lastScrollX) {
percent = 0.1 * (__rol_GetScrollLeft() - iactive_pan_lastScrollX);
if(percent > 0) percent = Math.ceil(percent);
else percent = Math.floor(percent);
__rol_SetStyleLeft(__rol_panel, __rol_GetStyleLeft(__rol_panel)+percent);
iactive_pan_lastScrollX = iactive_pan_lastScrollX + percent;
} 
}
//iactive_pan_action = setInterval('iactive_pan_heartBeat()',5);
</script>
<script language="javascript">
<!--
var UIShell = true;
var IndexPath = window.location.href;
var sChapterURLlink = "";
var bChapterURLOpenatNewWin = "1";
var bChapterPlaySequence = "0";
var bChapterRAccess = "1";
var bChapterCookieEnabled = "1";
var bChapterResizeDisable = "1";
var bChapterTestPopup = "0";
var bHasCaption = "0";


var QuizInfo = new Array();
QuizInfo=[[-1,0,100,1],];

var QuizChapter = new Array();
QuizChapter=["ch04",];

var QuizTime = new Array();
QuizTime=["1184",];


var ChapterStartTime;
ChapterStartTime = "0,72759,280807,2526464,";


var contentObject = "contents.contents";
var bAutoStart = true;

function ChangeChapter(url, bStop)
{ 
if (!eval(contentObject).CheckTOC(eval(contentObject).getPresentTime()*1000, 1))
{
alert (eval(contentObject).Navmessage); 
return;
}

var num = IndexPath.indexOf("index.htm");
var strsub = IndexPath.substring(0,num); 
contents.location.href = strsub + url + "/index.htm"; 


if(bStop) 
{
if(contentObject == "contents.contents.contents") 
setTimeout("eval(contentObject).mpstop()", 2000); 
else
setTimeout("eval(contentObject).mpstop()", 2000);
} 
}

function setCookie(name, value)
{
if(name == "chapter") 
{
if(bChapterCookieEnabled == 1)
{
var exp = new Date();
exp.setTime(exp.getTime() + (1000 * 60 * 60 * 24 * 31)); 
document.cookie = escape(name) + "=" + escape(value) + "; expires=" + exp.toGMTString(); 
}else
document.cookie = escape(name) + "=" + escape(value) + "; expires=0";
}
else if(name.indexOf("ch") != -1) 
{ 
var exp = new Date();
exp.setTime(exp.getTime() + (1000 * 60 * 60 * 24 * 31)); 
document.cookie = escape(name) + "=" + escape(value) + "; expires=" + exp.toGMTString();
}
}

function getCookie(name)
{
var cookiename;
if(name == "chapter")
cookiename = name + "=";
else
cookiename = QuizChapter[name] + QuizTime[name] + "Grade" + "="; 
var dc = document.cookie;
var begin, end;
if(dc.length >0)
{ 
begin = dc.indexOf(cookiename); 
if(begin != -1)
{
begin += cookiename.length;
end = dc.indexOf(";", begin);
if(end == -1)
{
end = dc.length;
}
return unescape(dc.substring(begin, end));
}
}

return null;
}

function selectChapter()
{
if(bChapterCookieEnabled != 1)
return;

var chaptername = getCookie("chapter");
if(chaptername != null)
ChangeChapter(chaptername, false);
}
//-->
</script>
乔巴船长的主页 乔巴船长 | 初学一级 | 园豆:159
提问于:2014-12-11 21:44
< >
分享
最佳答案
0

 视频的话应该有自己的链接,你要找到那个链接,而不是页面的链接

 你可以用F12里的网络来查看,根据类型来找你要的视频

收获园豆:50
xmj112288 | 初学一级 |园豆:126 | 2014-12-12 18:31

我想要动态获取,打开页面直接得到视频链接,一直F12太浪费时间

乔巴船长 | 园豆:159 (初学一级) | 2014-12-13 22:55
其他回答(3)
0

1. 用好博问, 插入代码的方式插入代码, 否则看得头晕。 

2. MediaPlayer这种方式你获取源码,得用webbrowser打开。 

问天何必 | 园豆:3311 (老鸟四级) | 2014-12-12 09:21

您好,请问有例子么,我定义了webbrowser然后获取到body的信息里也不是执行完js的最后链接信息

支持(0) 反对(0) 乔巴船长 | 园豆:159 (初学一级) | 2014-12-12 17:02

@乔巴船长: 试一试加载完毕后再执行获取方法. 

支持(0) 反对(0) 问天何必 | 园豆:3311 (老鸟四级) | 2014-12-12 21:22
0

..这么长看个毛线

+小马哥++ | 园豆:906 (小虾三级) | 2014-12-12 11:50
0

太长了,不看~~~

六年约定三年承诺 | 园豆:101 (初学一级) | 2014-12-12 17:07
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册