dsce23640 2017-12-16 15:16
浏览 23

解析我自己的网站时遇到一些令人困惑的问题

Currently I am parsing one of my own websites which has a lot of static HTML content within the parse, this is causing some conflict for some reason.

The content I'm scraping isn't returning every element properly..

Array from Parse output.

Array
(
    [url] => http://example.com/7477/starlito-funerals-court-dates-2-20172
    [image] => http://example.com/wp-content/uploads/2017/12/cover-26.jpg
    [title] => Starlito – Funerals & Court Dates 2 (2017) 
    [genre] => Rap 
    [download] => http://example.org/rnh78zfq6jdl
    [tracklist] => <li class="track" data-index="0" data-file="http://example.com.pk/mp3embed-fl759o9soiuc.mp3"><a href="#" class="title name"><span class="name">01. Funerals & Court Dates 2 </span></a><ul class="actions"><li><a href="http://example.com/fl759o9soiuc" target="_blank"> <span class="fa fa-arrow-down mobile-only-ib"></span> <span class="text desktop-only-ib">Download</span> </a> </li> </ul> </li> 
)

The part we're looking at here is the [tracklist] portion, this above shows that it's scraping perfectly fine. However when I go to store it into my WordPress site it returns something like this for the [tracklist] portion.

<li class="track">
<a href="#" class="title name">
    <span class="name">01. Funerals &amp; Court Dates 2 </span>
</a>
<ul class="actions">
<li>
<a href="http://example.pk/fl759o9soiuc" target="_blank"> 
    <span class="fa fa-arrow-down mobile-only-ib"></span> 
    <span class="text desktop-only-ib">Download</span>
</a> 
</li> 
</ul>

For those who don't wanna look over this, it appears that it removes the data-index="0" data-file="http://example.com.pk/mp3embed-fl759o9soiuc.mp3" portion completely, what in the world could be the cause of this?

Another important note is that..

I think it only does this when it's ran through a cronjob as when I manually load the parse file, it returns everything perfectly as it appears in the array.

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

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