Fix indentation and remove empty lines
This commit is contained in:
parent
2a02023c8a
commit
83d7f138ed
1 changed files with 47 additions and 48 deletions
|
@ -2,13 +2,11 @@
|
|||
class LeJournalDuGeekBridge extends BridgeAbstract{
|
||||
|
||||
public function loadMetadatas() {
|
||||
|
||||
$this->maintainer = "polopollo";
|
||||
$this->name = "journaldugeek.com (FR)";
|
||||
$this->uri = "http://www.journaldugeek.com/";
|
||||
$this->description = "Returns the 5 newest posts from LeJournalDuGeek (full text).";
|
||||
$this->update = "2016-08-03";
|
||||
|
||||
}
|
||||
|
||||
function LeJournalDuGeekStripCDATA($string) {
|
||||
|
@ -20,15 +18,17 @@ class LeJournalDuGeekBridge extends BridgeAbstract{
|
|||
function LeJournalDuGeekExtractContent($url) {
|
||||
$articleHTMLContent = $this->file_get_html($url);
|
||||
$text = $text.$articleHTMLContent->find('div.post-content', 0)->innertext;
|
||||
|
||||
foreach($articleHTMLContent->find('a.more') as $element) {
|
||||
if ($element->innertext == "Source") {
|
||||
$text = $text.'<p><a href="'.$element->href.'">Source : '.$element->href.'</a></p>';
|
||||
$text = $text . '<p><a href="' . $element->href . '">Source : ' . $element->href . '</a></p>';
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
foreach($articleHTMLContent->find('iframe') as $element) {
|
||||
if (preg_match("/youtube/i", $element->src)) {
|
||||
$text = $text.'// An IFRAME to Youtube was included in the article: <a href="'.$element->src.'">'.$element->src.'</a><br>';
|
||||
$text = $text . '// An IFRAME to Youtube was included in the article: <a href="' . $element->src . '">' . $element->src . '</a><br>';
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -51,7 +51,6 @@ class LeJournalDuGeekBridge extends BridgeAbstract{
|
|||
$limit++;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public function getName(){
|
||||
|
|
Loading…
Reference in a new issue