mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-07-30 05:10:15 +02:00
@@ -1,9 +1,9 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* RssBridgeLWNprev
|
* RssBridgeLWNprev
|
||||||
*
|
*
|
||||||
* @name LWNPrev Bridge
|
* @name LWNPrev Bridge
|
||||||
* @description Returns the articles from the previous LWN.net edition
|
* @description Returns the articles from the previous LWN.net edition
|
||||||
*/
|
*/
|
||||||
class LWNprevBridge extends BridgeAbstract{
|
class LWNprevBridge extends BridgeAbstract{
|
||||||
public function loadMetadatas() {
|
public function loadMetadatas() {
|
||||||
@@ -74,16 +74,16 @@ class LWNprevBridge extends BridgeAbstract{
|
|||||||
$this->jumpToNextTag($h2NextSibling);
|
$this->jumpToNextTag($h2NextSibling);
|
||||||
|
|
||||||
switch($h2NextSibling->getAttribute('class')){
|
switch($h2NextSibling->getAttribute('class')){
|
||||||
case 'FeatureByline':
|
case 'FeatureByline':
|
||||||
$item->name=$h2NextSibling->getElementsByTagName('b')->item(0)->textContent;
|
$item->name=$h2NextSibling->getElementsByTagName('b')->item(0)->textContent;
|
||||||
break;
|
break;
|
||||||
case 'GAByline':
|
case 'GAByline':
|
||||||
$text=$h2NextSibling->textContent;
|
$text=$h2NextSibling->textContent;
|
||||||
$item->name=substr($text,strpos($text,'by '));
|
$item->name=substr($text,strpos($text,'by '));
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
$item->name='LWN';
|
$item->name='LWN';
|
||||||
break;
|
break;
|
||||||
};
|
};
|
||||||
|
|
||||||
$h2FirstChild=$h2->firstChild;
|
$h2FirstChild=$h2->firstChild;
|
||||||
@@ -137,7 +137,7 @@ class LWNprevBridge extends BridgeAbstract{
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
){
|
){
|
||||||
$contentEnd=true;
|
$contentEnd=true;
|
||||||
}else{
|
}else{
|
||||||
$content.=$node->C14N();
|
$content.=$node->C14N();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user