mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-08-03 17:44:48 +02:00
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:
parent
f43bbda83e
commit
3c0d13c1bb
121 changed files with 1212 additions and 396 deletions
|
@ -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
|
||||
}
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue