我怎么能在这里用Domcrawler实现这个解决方案?
<?php
use Symfony\Component\DomCrawler\Crawler;
$crawler = new Crawler();
$content = file_get_contents('http://example.com/somepage.html');
$crawler->addHtmlContent($content, 'UTF-8');
$content = $crawler->filter('#main-content');
// Remove content by tag and by css selector.
?>