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{
|
class LeJournalDuGeekBridge extends BridgeAbstract{
|
||||||
|
|
||||||
public function loadMetadatas() {
|
public function loadMetadatas() {
|
||||||
|
|
||||||
$this->maintainer = "polopollo";
|
$this->maintainer = "polopollo";
|
||||||
$this->name = "journaldugeek.com (FR)";
|
$this->name = "journaldugeek.com (FR)";
|
||||||
$this->uri = "http://www.journaldugeek.com/";
|
$this->uri = "http://www.journaldugeek.com/";
|
||||||
$this->description = "Returns the 5 newest posts from LeJournalDuGeek (full text).";
|
$this->description = "Returns the 5 newest posts from LeJournalDuGeek (full text).";
|
||||||
$this->update = "2016-08-03";
|
$this->update = "2016-08-03";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function LeJournalDuGeekStripCDATA($string) {
|
function LeJournalDuGeekStripCDATA($string) {
|
||||||
|
@ -20,12 +18,14 @@ class LeJournalDuGeekBridge extends BridgeAbstract{
|
||||||
function LeJournalDuGeekExtractContent($url) {
|
function LeJournalDuGeekExtractContent($url) {
|
||||||
$articleHTMLContent = $this->file_get_html($url);
|
$articleHTMLContent = $this->file_get_html($url);
|
||||||
$text = $text.$articleHTMLContent->find('div.post-content', 0)->innertext;
|
$text = $text.$articleHTMLContent->find('div.post-content', 0)->innertext;
|
||||||
|
|
||||||
foreach($articleHTMLContent->find('a.more') as $element) {
|
foreach($articleHTMLContent->find('a.more') as $element) {
|
||||||
if ($element->innertext == "Source") {
|
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;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach($articleHTMLContent->find('iframe') as $element) {
|
foreach($articleHTMLContent->find('iframe') as $element) {
|
||||||
if (preg_match("/youtube/i", $element->src)) {
|
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++;
|
$limit++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getName(){
|
public function getName(){
|
||||||
|
|
Loading…
Reference in a new issue