mardi 31 octobre 2017

DOM Crawler selectLink when value inside

Hello i want to ask how to do selectLink()

example

<a href="/blog/category/security-advisories">Security Advisories</a>

$client = new Client(); 
$link = $crawler->selectLink('SecurityAdvisories')->link(); 
$crawler_download = $client->click($link);

but my problem is like this

<a href=" /naruto-shippuden-episode-5" class="">
<div class="name"> EP 5</div>
<div class="vien"></div>
<div class="cate">SUB</div>
</a>

here's my code and it says node list empty and cant use the ->click()

$crawler_episode_lists->filter('a .name')->each(function ($node, $i) {
    print($node->text(). "\n");
    $link = $crawler_episode_lists->filter('a .name')->link();
    $crawler_download = $get_episode_lists->click($link);
});

Anyone face problem like this ? Thank you.



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2iPH2iR
via IFTTT

Aucun commentaire:

Enregistrer un commentaire