dtyqeoc70733 2012-12-14 07:14
浏览 14

Web爬网程序脚本不适用于日历事件

I have written a web crawler script Code is::

<?php
include_once('simple_html_dom.php');
$target_url = "http://jvlaunchcalendar.com/calendar/";
$html = new simple_html_dom();
$html->load_file($target_url);
$ret = $html->find('div[class=fc-event-inner'); 
//to print the caleder events similar code //works for other sites like flipcat.com
foreach($ret as $post)
{
    echo $post.'<br />';
}
echo $html;// to print the calender of jvlaunchcalendar.com site
?>

This script works fine for other sites . But I want all calender events of http://jvlaunchcalendar.com/calendar/ page but this script doesn't display any event gives empty calender. Please help me to get the events of calender .

Regards.

  • 写回答

1条回答 默认 最新

  • dongxing8766 2012-12-14 08:10
    关注

    When you're trying to $html->load_file($target_url); you got empty page with no events coz events are loaded with ajax.

    Simple solution to get events: track ajax url calling and load it, not page. (i checked, it returns json data, all is ok).

    But it's not good. Other ways - do it inside WordPress with native calendar functions.

    评论

报告相同问题?

悬赏问题

  • ¥15 GDI处理通道视频时总是带有白色锯齿
  • ¥20 用雷电模拟器安装百达屋apk一直闪退
  • ¥15 算能科技20240506咨询(拒绝大模型回答)
  • ¥15 自适应 AR 模型 参数估计Matlab程序
  • ¥100 角动量包络面如何用MATLAB绘制
  • ¥15 merge函数占用内存过大
  • ¥15 Revit2020下载问题
  • ¥15 使用EMD去噪处理RML2016数据集时候的原理
  • ¥15 神经网络预测均方误差很小 但是图像上看着差别太大
  • ¥15 单片机无法进入HAL_TIM_PWM_PulseFinishedCallback回调函数