【发布时间】:2020-07-16 10:23:29
【问题描述】:
我正在使用简单的 html dom 解析器和 php 来解析使用以下代码的链接。
foreach($html->find('div#ProductDescription_Tab') as $description)
{
$comments = $description->find('.hsn_comments', 0);
$comments->outertext = '';
echo $description->outertext;
}
这为我提供了解析后的数据以及 javascript“脚本”标签。如何删除这些脚本标签?
【问题讨论】:
标签: php parsing web-scraping xml-parsing html-parsing