我正在使用Symfony2 DOMCrawler。我在页面上有一个链接。我想通过链接和爬行一些内容那里。我该怎么做呢?LEt代码如下所示
<a href="www.example.com">Go there</a>我知道$crawler->selectLink('Go there')->link();的事
发布于 2013-06-05 09:52:55
也许你正在寻找类似这样的东西:
$link = $crawler->filter('a[id="fabulous_id"]')->attr('href');
$crawler = $client->request('GET',$link);在DomCrawler Doc上查找信息
发布于 2012-08-14 18:25:03
您正在寻找click()方法。
$link = $crawler->selectLink('Go there')->link();
$crawler = $client->click($link);您应该更仔细地阅读this documentation chapter
https://stackoverflow.com/questions/11950057
复制相似问题