1
0
Fork 0
forked from blallo/rss-bridge

[bridges] Activate all calls to the 'message' function

This commit is contained in:
logmanoriginal 2016-08-24 18:20:49 +02:00
parent c0c4759cde
commit 1e9edf49de
5 changed files with 10 additions and 10 deletions

View file

@ -21,14 +21,14 @@ class Freenews extends RssExpander {
protected function parseRSSItem($newsItem) {
$item = array();
$item['title'] = trim($newsItem->title);
// $this->message("item has for title \"".$item['title']."\"");
$this->message("item has for title \"".$item['title']."\"");
if(empty($newsItem->guid)) {
$item['uri'] = (string) $newsItem->link;
} else {
$item['uri'] = (string) $newsItem->guid;
}
// now load that uri from cache
// $this->message("now loading page ".$item['uri']);
$this->message("now loading page ".$item['uri']);
$articlePage = str_get_html($this->get_cached($item['uri']));
$content = $articlePage->find('.post-container', 0);

View file

@ -28,7 +28,7 @@ class Gawker extends RssExpander{
$this->name = $param['site'];
$url = $this->toURI(strtolower($param['site']));
}
// $this->message("loading feed from ".$this->getURI());
$this->message("loading feed from ".$this->getURI());
parent::collectExpandableDatas($param, $url);
}
@ -37,10 +37,10 @@ class Gawker extends RssExpander{
$item['uri'] = trim($newsItem->link);
$item['title'] = trim($newsItem->title);
$item['timestamp'] = $this->RSS_2_0_time_to_timestamp($newsItem);
// $this->message("///////////////////////////////////////////////////////////////////////////////////////\nprocessing item ".var_export($item, true)."\n\n\nbuilt from\n\n\n".var_export($newsItem, true));
$this->message("///////////////////////////////////////////////////////////////////////////////////////\nprocessing item ".var_export($item, true)."\n\n\nbuilt from\n\n\n".var_export($newsItem, true));
try {
// now load that uri from cache
// $this->message("loading page ".$item['uri']);
$this->message("loading page ".$item['uri']);
$articlePage = str_get_html($this->get_cached($item['uri']));
if(is_object($articlePage)) {
$content = $articlePage->find('.post-content', 0);
@ -51,7 +51,7 @@ class Gawker extends RssExpander{
$item['author'] = $authorLink->innertext;
// TODO use author link href to fill the feed info
}
// $this->message("item quite loaded : ".var_export($item, true));
$this->message("item quite loaded : ".var_export($item, true));
// I set item content as last element, for easier var_export reading
$item['content'] = $content->innertext;
} else {

View file

@ -21,14 +21,14 @@ class Les400Culs extends RssExpander{
protected function parseRSSItem($newsItem) {
$item = array();
$item['title'] = trim((string) $newsItem->title);
// $this->message("browsing item ".var_export($newsItem, true));
$this->message("browsing item ".var_export($newsItem, true));
if(empty($newsItem->guid)) {
$item['uri'] = (string) $newsItem->link;
} else {
$item['uri'] = (string) $newsItem->guid;
}
// now load that uri from cache
// $this->message("now loading page ".$item['uri']);
$this->message("now loading page ".$item['uri']);
// $articlePage = str_get_html($this->get_cached($item['uri']));
// $content = $articlePage->find('.post-container', 0);

View file

@ -24,7 +24,7 @@ class TheOatmealBridge extends RssExpander{
protected function collect_RSS_2_0_data($rssContent) {
$rssContent->registerXPathNamespace("dc", "http://purl.org/dc/elements/1.1/");
$rssHeaderContent = $rssContent->channel[0];
// $this->message("RSS content is ===========\n".var_export($rssHeaderContent, true)."===========");
$this->message("RSS content is ===========\n".var_export($rssHeaderContent, true)."===========");
$this->load_RSS_2_0_feed_data($rssHeaderContent);
foreach($rssContent->item as $item) {
$this->message("parsing item ".var_export($item, true));

View file

@ -57,7 +57,7 @@ class WorldOfTanks extends HttpCachingBridgeAbstract{
$item = array();
$item['uri'] = WORLD_OF_TANKS.$infoLink->href;
// now load that uri from cache
// $this->message("loading page ".$item['uri']);
$this->message("loading page ".$item['uri']);
$articlePage = str_get_html($this->get_cached($item['uri']));
$content = $articlePage->find('.l-content', 0);
HTMLSanitizer::defaultImageSrcTo($content, WORLD_OF_TANKS);