检索另一个网站的内容以拥有其页面 [英] To retrive the content of the Another site to own page

查看:59
本文介绍了检索另一个网站的内容以拥有其页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我想检索另一个站点的内容...

我有一个如下页面:
我想从下一页检索< span>值和< table>值;
请帮助我...

< div class ="pnl490M">
< div class ="ciPlayernametxt" style =">
< div style ="margin:0pt; float:left; padding-bottom:3px;">
< h1> MS Dhoni< a href ="/rss/content/story/feeds/28081.rss" id ="rssIcon" alt ="MS Dhoni RSS Feed" title ="Mahendra Singh Dhoni RSS Feed" style ="padding :1px 0pt 0pt;>& nbsp;& nbsp;& nbsp;& nbsp;</a>

</h1>
< h3 class ="PlayersSearchLink">< b>印度</b></h3>
</div>

</div>

< div style ="float:left; display:table-cell; margin-bottom:10px;">
< div style ="float:left; width:310px; color:rgb(102,102,102); font-size:11px;">
< p class ="ciPlayerinformationtxt">< b>全名</b>
< span> Mahendra Singh Dhoni</span</p>
< p class ="ciPlayerinformationtxt">< b> Born</b>
< span>
1981年7月7日,兰契</span</p>
< p class ="ciPlayerinformationtxt">< b>当前年龄</b> < span> 28年331天</span</p>

< p class ="ciPlayerinformationtxt">< b>主要团队</b> < span style ="white-space:nowrap;">印度,</span> < span style ="white-space:nowrap;"> Asia XI,</span> < span style ="white-space:nowrap;"> Bihar,</span> < span style =白色空间:nowrap;">金奈超级国王,</span> < span style ="white-space:nowrap;"> Jharkhand</span></p>
< p class ="ciPlayerinformationtxt"< b>也称为</b>. < span> Mahi</span</p>

< p class ="ciPlayerinformationtxt">< b>击球风格</b> < span>右手蝙蝠</span>/p>
< p class ="ciPlayerinformationtxt">< b>保龄球风格</b> < span>右臂媒体</span</p>
< p class ="ciPlayerinformationtxt">< b> Fielding position</b> < span> Wicketkeeper</span>/p>

< script type ="text/javascript">
$(document).ready(function(){
fixIframe();
函数fixIframe(){
$(''.FB_ElementReady iframe'').css({''height'':``30px'',''width'':''300px''});
if($(''.FB_ElementReady iframe'').height()> 38 || $(''.FB_ElementReady iframe'').height()== 0 || $(''.FB_ElementReady iframe'') .height()== null){
window.setTimeout(fixIframe,1300);
}
}
});
</script>

<!-iframe id ="fbLike" scrolling ="no" frameborder ="0" src ="http://www.facebook.com/widgets/like.php?href=http://www.cricinfo. com/india/content/player/28081.html& height = 30& width = 310"allowtransparency =" true"name =" fbLike"style =" width:310px; height:27px; border:medium none;>< ;/iframe->
< fb:like class ="fb_edge_widget_with_comment fb_iframe_widget" width ="310" height ="27" show_faces ="false" href ="http://www.cricinfo.com/india/content/player/28081.html"布局="box">< span>< iframe src ="http://www.facebook.com/plugins/like.php?api_key=260890547115&channel_url=http%3A%2F%2Fwww.cricinfo. com%2Findia%2Fcontent%2Fplayer%2F28081.html%3Ffb_xd_fragment%23%3F%3D%26cb%3Df3b9737202d1a22%26relation%3Dparent.parent%26transport%3Dfragment& amp; href = http%www.cric.com 2Findia%2Fcontent%2Fplayer%2F28081.html& amp; layout = standard& amp; locale = en_US& amp; node_type = link& amp; sdk = joey& amp; show_faces = false& amp; width = 310"style =" border :中等,无;溢出:隐藏;高度:23像素;宽度:310像素;" name ="f74194f9b8a962" id ="f98d73dea926ca"></iframe></span></fb:like>
</div>

谢谢

Hi ,

I wan to retrive the content of the another site...

i have a page like following :
from the following page i want to retrive the <span> value and <table> values;
Please help me .....

<div class="pnl490M">
<div class="ciPlayernametxt" style="">
<div style="margin: 0pt; float: left; padding-bottom: 3px;">
<h1>MS Dhoni<a href="/rss/content/story/feeds/28081.rss" id="rssIcon" alt="MS Dhoni RSS Feed" title="Mahendra Singh Dhoni RSS Feed" style="padding: 1px 0pt 0pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a>

</h1>
<h3 class="PlayersSearchLink"><b>India</b></h3>
</div>

</div>

<div style="float: left; display: table-cell; margin-bottom: 10px;">
<div style="float: left; width: 310px; color: rgb(102, 102, 102); font-size: 11px;">
<p class="ciPlayerinformationtxt"><b>Full name</b>
<span>Mahendra Singh Dhoni</span></p>
<p class="ciPlayerinformationtxt"><b>Born</b>
<span>
July 7, 1981, Ranchi </span></p>
<p class="ciPlayerinformationtxt"><b>Current age</b> <span>28 years 331 days</span></p>

<p class="ciPlayerinformationtxt"><b>Major teams</b> <span style="white-space: nowrap;">India,</span> <span style="white-space: nowrap;">Asia XI,</span> <span style="white-space: nowrap;">Bihar,</span> <span style="white-space: nowrap;">Chennai Super Kings,</span> <span style="white-space: nowrap;">Jharkhand</span></p>
<p class="ciPlayerinformationtxt"><b>Also known as</b> <span>Mahi</span></p>

<p class="ciPlayerinformationtxt"><b>Batting style</b> <span>Right-hand bat</span></p>
<p class="ciPlayerinformationtxt"><b>Bowling style</b> <span>Right-arm medium</span></p>
<p class="ciPlayerinformationtxt"><b>Fielding position</b> <span>Wicketkeeper</span></p>

<script type="text/javascript">
$(document).ready(function(){
fixIframe();
function fixIframe(){
$(''.FB_ElementReady iframe'').css({''height'':''30px'',''width'':''300px''});
if($(''.FB_ElementReady iframe'').height()>38 || $(''.FB_ElementReady iframe'').height()==0 || $(''.FB_ElementReady iframe'').height()== null){
window.setTimeout(fixIframe,1300);
}
}
});
</script>

<!--iframe id="fbLike" scrolling="no" frameborder="0" src="http://www.facebook.com/widgets/like.php?href=http://www.cricinfo.com/india/content/player/28081.html&height=30&width=310" allowtransparency="true" name="fbLike" style="width: 310px; height: 27px; border: medium none;"></iframe-->
<fb:like class="fb_edge_widget_with_comment fb_iframe_widget" width="310" height="27" show_faces="false" href="http://www.cricinfo.com/india/content/player/28081.html" layout="box"><span><iframe src="http://www.facebook.com/plugins/like.php?api_key=260890547115&amp;channel_url=http%3A%2F%2Fwww.cricinfo.com%2Findia%2Fcontent%2Fplayer%2F28081.html%3Ffb_xd_fragment%23%3F%3D%26cb%3Df3b9737202d1a22%26relation%3Dparent.parent%26transport%3Dfragment&amp;href=http%3A%2F%2Fwww.cricinfo.com%2Findia%2Fcontent%2Fplayer%2F28081.html&amp;layout=standard&amp;locale=en_US&amp;node_type=link&amp;sdk=joey&amp;show_faces=false&amp;width=310" style="border: medium none ; overflow: hidden; height: 23px; width: 310px;" name="f74194f9b8a962" id="f98d73dea926ca"></iframe></span></fb:like>
</div>

Thanks

推荐答案

(document).ready(function(){
fixIframe();
函数fixIframe(){
(document).ready(function(){
fixIframe();
function fixIframe(){


(''.FB_ElementReady iframe'').css({''height'':``30px'',''width'' :''300px''});
if(
(''.FB_ElementReady iframe'').css({''height'':''30px'',''width'':''300px''});
if(


(''.FB_ElementReady iframe'').height()> 38 ||
(''.FB_ElementReady iframe'').height()>38 ||


这篇关于检索另一个网站的内容以拥有其页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆