Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在学习 Goutte 时遇到了这些,但我不知道它们有什么不同?
filterXPath允许您按 XPath 表达式进行过滤,同时filter允许您按 CSS 选择器进行过滤。前任:
filterXPath
filter
$crawler = $crawler->filterXPath('descendant-or-self::body/p'); $crawler = $crawler->filter('body > p');