dpd3982 2014-01-09 13:49
浏览 50

简单的HTML DOM解析器与Chrome Source Viewer不同?

Trying to get code from this page xem-phim-sat-pha-lang-kill-zone

if press F12 on Chrome and Press Ctrl+F to find Object Tags, you will see Object tag with flashvar and some param tags. but i use Simple_html_dom.php to parsing, it cannot show that Object tags...

$html2=file_get_html('http://phimhay77.com/xem-phim-sat-pha-lang-kill-zone-33797');
$hihi=$html2->find('object',0);
echo htmlentities($hihi);
  • 写回答

1条回答 默认 最新

  • dongshi1934 2014-01-09 13:57
    关注

    If you press Ctrl-F in Chrome then you see the DOM: which is the DOM from the original source HTML, plus modifications cause by any JavaScript which has run.

    My guess is that the <object> which you see was created by JavaScript, and that the <object>does not exist in the original source HTML (I don't see an <object> in the HTML when I do "view page source"); and I guess that file_get_html is parsing the HTML without/before any modifications made to the DOM by JavaScript.

    I suspect that the <object> which you're seeing is from the 'jwplayer' video player component (see this hyperlink and this hyperlink for further details), which uses inserts <object> into the DOM if it's run in a browser which supports the Adobe Flash player.


    So How can I parsing Value of "Proxy.link" from this script?

    It's here in the HTML source code:

    <div id="media" >
        <div id="mediaplayer"></div>
        <script type="text/javascript">
        jwplayer("mediaplayer").setup({
        "flashplayer": "http://player.xixam.com/player.swf",
        "width": "100%",
        "height": "100%",
        "proxy.link": "http://www.youtube.com/watch?v=a65tyLkqR8U",
        "repeat": "list",
        "autostart": "true",
    "skin":"http://coiphim.vn/public/js/player_5/nacht/nacht.xml",
    "controlbar":"bottom",
        "plugins": "captions,timeslidertooltipplugin-2,fbit-1,http://player.xixam.com/plugins4/proxy.swf",
        "captions.file": "http://phimhay77.com/player/alophim.srt",
        "captions.color": "#FFCC00",
        "captions.fontFamily": "Arian,sans-serif",
        "captions.fontSize": "18",
    "logo.file":       "http://phimhay77.com/player/logo.png",
        "logo.position":       "top-left",
        "logo.margin":       "5",
        "logo.over":       "1",
        "logo.out":       "1",
        "logo.hide":       "false",
        events: {
                onComplete: function autonext() {
         Phim3s.Watch.autoNextExecute();
    }
    
            }
        });
        </script>
    </div>
    
    评论

报告相同问题?

悬赏问题

  • ¥15 基于卷积神经网络的声纹识别
  • ¥15 Python中的request,如何使用ssr节点,通过代理requests网页。本人在泰国,需要用大陆ip才能玩网页游戏,合法合规。
  • ¥100 为什么这个恒流源电路不能恒流?
  • ¥15 有偿求跨组件数据流路径图
  • ¥15 写一个方法checkPerson,入参实体类Person,出参布尔值
  • ¥15 我想咨询一下路面纹理三维点云数据处理的一些问题,上传的坐标文件里是怎么对无序点进行编号的,以及xy坐标在处理的时候是进行整体模型分片处理的吗
  • ¥15 CSAPPattacklab
  • ¥15 一直显示正在等待HID—ISP
  • ¥15 Python turtle 画图
  • ¥15 stm32开发clion时遇到的编译问题