bridges: use BridgeAbstract::getSimpleHTMLDOM

instead of BridgeAbstract::file_get_html

Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
This commit is contained in:
Pierre Mazière 2016-07-08 19:06:35 +02:00
parent f43bbda83e
commit 3c0d13c1bb
121 changed files with 1212 additions and 396 deletions

View file

@ -33,7 +33,7 @@ class ElsevierBridge extends BridgeAbstract{
$time = $article->find('.article-info', 0);
if($time){
$timestring = trim($time->plaintext);
/*
/*
The format depends on the age of an article:
- Available online 29 July 2016
- July 2016
@ -63,7 +63,7 @@ class ElsevierBridge extends BridgeAbstract{
public function collectData(array $param){
$uri = 'http://www.journals.elsevier.com/' . $param['j'] . '/recent-articles/';
$html = file_get_html($uri) or $this->returnServerError('No results for Elsevier journal '.$param['j']);
$html = $this->getSimpleHTMLDOM($uri) or $this->returnServerError('No results for Elsevier journal '.$param['j']);
foreach($html->find('.pod-listing') as $article){
$item = new \Item();
@ -80,4 +80,4 @@ class ElsevierBridge extends BridgeAbstract{
return 43200; // 12h
}
}
?>
?>