0
我已经浪费了1天时间,试图通过PHP Simple HTML DOM Parser从HTML页面获取一些链接。简单的html DOM解析器获取html标记
我的HTML代码:
<video id="videoPlayer1_lbp" width="660" height="281" preload="none" controls poster="http://img.csfd.cz/files/images/film/video/preview/130/248/130248604_2a3904.jpg?h360" style="display: none">
<source src="http://video.csfd.cz/321/321909/130228151/360.mp4" type="video/mp4" width="846" height="360" />
<source src="http://video.csfd.cz/321/321909/130228151/720.mp4" type="video/mp4" width="1694" height="720" />
<source src="http://video.csfd.cz/321/321909/130228151/360.webm" type="video/webm" width="846" height="360" />
<source src="http://video.csfd.cz/321/321909/130228151/720.webm" type="video/webm" width="1694" height="720" />
<track src="/subtitles-proxy/?url=http://video.csfd.cz/321/321909/130228151/cz.srt" type="text/x-srt" kind="subtitles" srclang="cz" label="cz"></track>
</video>
我想从这个获得:
-
上.SRT .MP4文件正确的链接
- 正确的链接文件
我尝试吨的东西,我最后的尝试是这样的:
foreach ($html->find('video source') as $element) {
echo $element->plaintext . '<br>';
}
有人能帮我解决这个问题吗?
非常感谢
谢谢队友,它的工作原理:) – Andurit
一定要单击选中标记以便被标记为接受答案。 –