douyinzha5820 2015-09-25 12:29
浏览 40

如何使用简单的html dom获取脚本值?

I'm trying to get this content:

var block = new Block('page_competition_1_block_competition_tables_8', 'block_competition_tables', {"season_id":11663,"round_id":31554,"outgroup":false});

on this page:

view-source:http://it.soccerway.com/national/italy/serie-a/20152016/regular-season/r31554/?ICID=TN_02_01_02

Actually I made this code:

$html = file_get_html('http://it.soccerway.com/national/italy/serie-a/20152016/regular-season/r31554/?ICID=TN_02_01_02');

foreach ($html->find('script',0) as $element) 
{
   print_r($element);
}

But when I'll do the print there isn't no season_id and round_id, I want to get the value of this element. How I can achieve this?

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 Fluent udf 编写问题
    • ¥15 求合并两个字节流VB6代码
    • ¥15 Pyqt 如何正确的关掉Qthread,并且释放其中的锁?
    • ¥30 网站服务器通过node.js部署了一个项目!前端访问失败
    • ¥15 WPS访问权限不足怎么解决
    • ¥15 java幂等控制问题
    • ¥15 海湾GST-DJ-N500
    • ¥15 氧化掩蔽层与注入条件关系
    • ¥15 Django DRF 如何反序列化得到Python对象类型数据
    • ¥15 多数据源与Hystrix的冲突