Better tag handling
This commit is contained in:
parent
b37877bc74
commit
e3cf486ac5
1 changed files with 7 additions and 9 deletions
|
@ -32,16 +32,14 @@ class ArstechnicaBridge extends BridgeAbstract {
|
||||||
$html2 = file_get_html($url);
|
$html2 = file_get_html($url);
|
||||||
|
|
||||||
$text = $html2->find("section[id='article-guts']", 0);
|
$text = $html2->find("section[id='article-guts']", 0);
|
||||||
|
/*foreach ($text->find('<aside id="social-left">') as $node)
|
||||||
|
{ $node = NULL; }*/
|
||||||
$text = StripWithDelimiters($text->innertext,'<aside id="social-left">','</aside>');
|
$text = StripWithDelimiters($text->innertext,'<aside id="social-left">','</aside>');
|
||||||
$text = StripWithDelimiters($text,'<div class="caption-credit">','</div>');
|
$text = StripWithDelimiters($text,'<figcaption class="caption">','</figcaption>');
|
||||||
$text = StripWithDelimiters($text,'<div class="gallery shortcode-gallery">','</div>');
|
$text = StripWithDelimiters($text,'<div class="gallery shortcode-gallery">','</div>');
|
||||||
$text = StripWithDelimiters($text,'<div class="lSAction">','</div>');
|
//error_log("ICI", 0);
|
||||||
$text = StripWithDelimiters($text,'<figcaption ','</figcaption>');
|
//error_log($text, 0);
|
||||||
$text = StripWithDelimiters($text,'<li data-thumb','</li>');
|
|
||||||
//$text = strip_tags($text->innertext, '<p>');
|
|
||||||
#print_r("ICI");
|
|
||||||
#print_r($text);
|
|
||||||
#print_r("FIN");
|
|
||||||
return $text;
|
return $text;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -71,7 +69,7 @@ class ArstechnicaBridge extends BridgeAbstract {
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getCacheDuration() {
|
public function getCacheDuration() {
|
||||||
return 0; // 2h
|
return 7200; // 2h
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getURI() {
|
public function getURI() {
|
||||||
|
|
Loading…
Reference in a new issue