我正在使用Goutte抓取网页
我使用block来查找节点
$data = $crawler->filter('script');
如果我只想要第一个节点
$data = $crawler->filter('script')->first(); //is that right?
然后如何找到“A LINK”?我震惊了这个js块
<script>
jwplayer( "clipplayer" ).setup({
image: imgurl,
playlist: [{
sources: [{
bitrate: "640",
file: "A LINK",
label: "640SD",
type: "video/mp4",
provider: "video"},]
}],
width: 728,
height: 450,
primary: 'flash'
});
</script>
答案 0 :(得分:1)
我得到它只是将其转换为html并使用preg_match_all();