1
0
mirror of https://github.com/RSS-Bridge/rss-bridge.git synced 2025-08-12 11:34:09 +02:00

Merge branch 'methods2functions' of https://framagit.org/peetah/rss-bridge

This commit is contained in:
logmanoriginal
2016-10-02 16:05:58 +02:00
114 changed files with 899 additions and 904 deletions

View File

@@ -9,8 +9,8 @@ class CourrierInternationalBridge extends BridgeAbstract{
public function collectData(){
$html = $this->getSimpleHTMLDOM(self::URI)
or $this->returnServerError('Error.');
$html = getSimpleHTMLDOM(self::URI)
or returnServerError('Error.');
$element = $html->find("article");
@@ -26,11 +26,9 @@ class CourrierInternationalBridge extends BridgeAbstract{
$item['uri'] = self::URI.$item['uri'];
}
$page = $this->getSimpleHTMLDOM($item['uri']);
$page = getSimpleHTMLDOM($item['uri']);
$cleaner = new HTMLSanitizer();
$item['content'] = $cleaner->sanitize($page->find("div.article-text")[0]);
$item['content'] = sanitize($page->find("div.article-text")[0]);
$item['title'] = strip_tags($article->find(".title")[0]);
$dateTime = date_parse($page->find("time")[0]);