fixed a small bug regarding url processing
This commit is contained in:
parent
7b99ad3650
commit
6003daff9d
2 changed files with 7 additions and 10 deletions
|
@ -32,14 +32,13 @@ class TheOatmealBridge extends RssExpander{
|
|||
|
||||
|
||||
protected function parseRSSItem($newsItem) {
|
||||
$namespaces = $newsItem->getNameSpaces(true);
|
||||
$dc = $newsItem->children($namespaces['dc']);
|
||||
$rdf = $newsItem->children($namespaces['rdf']);
|
||||
$item = new Item();
|
||||
$item->title = trim($newsItem->title);
|
||||
$this->message("browsing Oatmeal item ".var_export($newsItem, true));
|
||||
if(empty($newsItem->guid)) {
|
||||
$item->uri = $newsItem->link;
|
||||
} else {
|
||||
$item->uri = $newsItem->guid;
|
||||
}
|
||||
$item->uri=$newsItem->attributes($namespaces['rdf'])->about;
|
||||
// now load that uri from cache
|
||||
$this->message("now loading page ".$item->uri);
|
||||
$articlePage = str_get_html($this->get_cached($item->uri));
|
||||
|
@ -50,9 +49,6 @@ class TheOatmealBridge extends RssExpander{
|
|||
}
|
||||
$item->content = $content->innertext;
|
||||
|
||||
$namespaces = $newsItem->getNameSpaces(true);
|
||||
|
||||
$dc = $newsItem->children($namespaces['dc']);
|
||||
$this->message("dc content is ".var_export($dc, true));
|
||||
$item->name = $dc->creator;
|
||||
$item->timestamp = DateTime::createFromFormat(DateTime::ISO8601, $dc->date)->getTimestamp();
|
||||
|
|
|
@ -13,7 +13,8 @@ TODO :
|
|||
|
||||
date_default_timezone_set('UTC');
|
||||
error_reporting(0);
|
||||
//ini_set('display_errors','1'); error_reporting(E_ALL); // For debugging only.
|
||||
//ini_set('display_errors','1');
|
||||
//error_reporting(E_ALL); // For debugging only.
|
||||
|
||||
// extensions check
|
||||
if (!extension_loaded('openssl'))
|
||||
|
@ -220,7 +221,7 @@ $formats = Format::searchInformation();
|
|||
|
||||
<header>
|
||||
<h1>RSS-Bridge</h1>
|
||||
<h2>·Reconnecting the Web·</h2>
|
||||
<h2>·Reconnecting the Web·</h2>
|
||||
</header>
|
||||
<?php
|
||||
$activeFoundBridgeCount = 0;
|
||||
|
|
Loading…
Reference in a new issue