dongyuan9149 2018-08-29 20:17
浏览 53

我无法通过webscraper获得完整的源代码 - SIMPLE HTML DOM

here is the problem, im scraping images from site (phillips.cz). Images which i need are in slider.. if i am on page and click to view the whole source code, copy it into my page.html and scrape the source code from scraper.php the slider is there with images.

But when I use simple html dom - code

<?php
//header("Content-type:text/plaintext");

//Importing classes
require_once("simple_html_dom.php");
require_once("ProjektX.php");

//Creating instance of crawler
$cr = new Crawler();

//Here i have ID of products which i edit d
$lines = file("basic.txt");
$lines = array_unique($lines);
$lines = array_values($lines);

//Here im editing them
foreach($lines as $a) 
$odkazy[] = "https://www.philips.cz" . trim($a);


//For testing im trying to get just one product of 2000
$odkazy = $cr->oddo(0,1,$odkazy);


foreach($odkazy as $a) {

    $html = new simple_html_dom();
    $html->load_file("https://www.philips.cz/c-p/7022331PH/stolni-svitidlo");

        
}
//Outputing the html source code
echo($html);

?>

It loads page BUT without the slider image. So back to my question - Why does it take just source code without the slider? And if you could direct me on the right path. Here is URL where im trying to get that slider images - https://www.philips.cz/c-p/7022331PH/stolni-svitidlo

</div>
  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥30 深度学习,前后端连接
    • ¥15 孟德尔随机化结果不一致
    • ¥15 apm2.8飞控罗盘bad health,加速度计校准失败
    • ¥15 求解O-S方程的特征值问题给出边界层布拉休斯平行流的中性曲线
    • ¥15 谁有desed数据集呀
    • ¥20 手写数字识别运行c仿真时,程序报错错误代码sim211-100
    • ¥15 关于#hadoop#的问题
    • ¥15 (标签-Python|关键词-socket)
    • ¥15 keil里为什么main.c定义的函数在it.c调用不了
    • ¥50 切换TabTip键盘的输入法