0

我想从这个站点获取数据,但 symfony 爬虫不适用于http://www.varzesh3.com/livescore/feed并且字符串没有获得

<?php

//echo __DIR__.'/vendor/autoload.php';
require_once __DIR__.'/vendor/autoload.php';


use Symfony\Component\DomCrawler\Crawler;


$html2 = file_get_contents('http://www.varzesh3.com/livescore/feed');

$crawler = new Crawler($html2);


$atc =  $crawler->filter('.stage-wrapper')->each(function (Crawler $nodeCrawler)
{
    var_dump($nodeCrawler->html());
    echo "a";
});
4

1 回答 1

0

我解决了

通过Guzzle php获取数据,然后将 body 传递给 symfony 爬虫

于 2017-01-14T11:11:10.763 回答