');
return $text;
}
- $html = file_get_html('http://feeds.feedburner.com/Frandroid?format=xml') or $this->returnError('Could not request Frandroid.', 404);
+ $html = $this->file_get_html('http://feeds.feedburner.com/Frandroid?format=xml') or $this->returnError('Could not request Frandroid.', 404);
$limit = 0;
foreach ($html->find('item') as $element) {
diff --git a/bridges/FuturaSciencesBridge.php b/bridges/FuturaSciencesBridge.php
index 222c7cdd..9cf893f3 100644
--- a/bridges/FuturaSciencesBridge.php
+++ b/bridges/FuturaSciencesBridge.php
@@ -155,13 +155,13 @@ class FuturaSciencesBridge extends BridgeAbstract {
$this->returnError('Invalid "feed" parameter.'.$url, 400);
$url = $this->getURI().'rss/'.$param['feed'].'.xml';
- $html = file_get_html($url) or $this->returnError('Could not request Futura-Sciences: '.$url, 500);
+ $html = $this->file_get_html($url) or $this->returnError('Could not request Futura-Sciences: '.$url, 500);
$limit = 0;
foreach($html->find('item') as $element) {
if ($limit < 10) {
$article_url = str_replace('#xtor=RSS-8', '', StripCDATA($element->find('guid', 0)->plaintext));
- $article = file_get_html($article_url) or $this->returnError('Could not request Futura-Sciences: '.$article_url, 500);
+ $article = $this->file_get_html($article_url) or $this->returnError('Could not request Futura-Sciences: '.$article_url, 500);
$contents = $article->find('div.content', 0)->innertext;
$author = trim(str_replace(', Futura-Sciences', '', $article->find('span.author', 0)->plaintext));
if (empty($author))
diff --git a/bridges/GBAtempBridge.php b/bridges/GBAtempBridge.php
index 6be852c9..d0d1faea 100644
--- a/bridges/GBAtempBridge.php
+++ b/bridges/GBAtempBridge.php
@@ -77,7 +77,7 @@ class GBAtempBridge extends BridgeAbstract {
}
function fetch_post_content($uri, $site_url) {
- $html = file_get_html($uri) or $this->returnError('Could not request GBAtemp: '.$uri, 500);
+ $html = $this->file_get_html($uri) or $this->returnError('Could not request GBAtemp: '.$uri, 500);
$content = $html->find('div.messageContent', 0)->innertext;
return cleanup_post_content($content, $site_url);
}
@@ -93,7 +93,7 @@ class GBAtempBridge extends BridgeAbstract {
} else $this->returnError('The provided type filter is invalid. Expecting N, R, T, or F.', 400);
} else $this->returnError('Please provide a type filter. Expecting N, R, T, or F.', 400);
- $html = file_get_html($this->getURI()) or $this->returnError('Could not request GBAtemp.', 500);
+ $html = $this->file_get_html($this->getURI()) or $this->returnError('Could not request GBAtemp.', 500);
if ($typeFilter == 'N') {
foreach ($html->find('li[class=news_item full]') as $newsItem) {
@@ -110,7 +110,7 @@ class GBAtempBridge extends BridgeAbstract {
$url = $this->getURI().$reviewItem->find('a', 0)->href;
$img = $this->getURI().ExtractFromDelimiters($reviewItem->find('a', 0)->style, 'image:url(', ')');
$title = $reviewItem->find('span.review_title', 0)->plaintext;
- $content = file_get_html($url) or $this->returnError('Could not request GBAtemp: '.$uri, 500);
+ $content = $this->file_get_html($url) or $this->returnError('Could not request GBAtemp: '.$uri, 500);
$author = $content->find('a.username', 0)->plaintext;
$time = intval(ExtractFromDelimiters($content->find('abbr.DateTime', 0)->outertext, 'data-time="', '"'));
$intro = ''.($content->find('div#review_intro', 0)->plaintext).'
';
diff --git a/bridges/GelbooruBridge.php b/bridges/GelbooruBridge.php
index 3747c40b..16968b8d 100644
--- a/bridges/GelbooruBridge.php
+++ b/bridges/GelbooruBridge.php
@@ -34,7 +34,7 @@ class GelbooruBridge extends BridgeAbstract{
if (isset($param['t'])) {
$tags = urlencode($param['t']);
}
- $html = file_get_html("http://gelbooru.com/index.php?page=post&s=list&tags=$tags&pid=$page") or $this->returnError('Could not request Gelbooru.', 404);
+ $html = $this->file_get_html("http://gelbooru.com/index.php?page=post&s=list&tags=$tags&pid=$page") or $this->returnError('Could not request Gelbooru.', 404);
foreach($html->find('div[class=content] span') as $element) {
diff --git a/bridges/GiphyBridge.php b/bridges/GiphyBridge.php
index 69442f6e..8f29bade 100644
--- a/bridges/GiphyBridge.php
+++ b/bridges/GiphyBridge.php
@@ -33,7 +33,7 @@ class GiphyBridge extends BridgeAbstract{
$html = '';
$base_url = 'http://giphy.com';
if (isset($param['s'])) { /* keyword search mode */
- $html = file_get_html($base_url.'/search/'.urlencode($param['s'].'/')) or $this->returnError('No results for this query.', 404);
+ $html = $this->file_get_html($base_url.'/search/'.urlencode($param['s'].'/')) or $this->returnError('No results for this query.', 404);
}
else {
$this->returnError('You must specify a search worf (?s=...).', 400);
@@ -51,7 +51,7 @@ class GiphyBridge extends BridgeAbstract{
$node = $entry->first_child();
$href = $node->getAttribute('href');
- $html2 = file_get_html($base_url . $href) or $this->returnError('No results for this query.', 404);
+ $html2 = $this->file_get_html($base_url . $href) or $this->returnError('No results for this query.', 404);
$figure = $html2->getElementByTagName('figure');
$img = $figure->firstChild();
$caption = $figure->lastChild();
diff --git a/bridges/GizmodoFRBridge.php b/bridges/GizmodoFRBridge.php
index bb19fc3d..2c4080fd 100644
--- a/bridges/GizmodoFRBridge.php
+++ b/bridges/GizmodoFRBridge.php
@@ -14,7 +14,7 @@ class GizmodoFRBridge extends BridgeAbstract{
public function collectData(array $param){
function GizmodoFRExtractContent($url) {
- $articleHTMLContent = file_get_html($url);
+ $articleHTMLContent = $this->file_get_html($url);
$text = $articleHTMLContent->find('div.entry-thumbnail', 0)->innertext;
$text = $text.$articleHTMLContent->find('div.entry-excerpt', 0)->innertext;
$text = $text.$articleHTMLContent->find('div.entry-content', 0)->innertext;
@@ -26,7 +26,7 @@ class GizmodoFRBridge extends BridgeAbstract{
return $text;
}
- $rssFeed = file_get_html('http://www.gizmodo.fr/feed') or $this->returnError('Could not request http://www.gizmodo.fr/feed', 404);
+ $rssFeed = $this->file_get_html('http://www.gizmodo.fr/feed') or $this->returnError('Could not request http://www.gizmodo.fr/feed', 404);
$limit = 0;
foreach($rssFeed->find('item') as $element) {
diff --git a/bridges/GooglePlusPostBridge.php b/bridges/GooglePlusPostBridge.php
index 16b3f100..878ee23b 100644
--- a/bridges/GooglePlusPostBridge.php
+++ b/bridges/GooglePlusPostBridge.php
@@ -33,8 +33,8 @@ class GooglePlusPostBridge extends BridgeAbstract
$this->request = $param['username'];
// get content parsed
-// $html = file_get_html(__DIR__ . '/../posts2.html'
- $html = file_get_html(self::GOOGLE_PLUS_BASE_URL . urlencode($this->request) . '/posts'
+// $html = $this->file_get_html(__DIR__ . '/../posts2.html'
+ $html = $this->file_get_html(self::GOOGLE_PLUS_BASE_URL . urlencode($this->request) . '/posts'
// force language
, false, stream_context_create(array('http'=> array(
'header' => 'Accept-Language: fr,fr-be,fr-fr;q=0.8,en;q=0.4,en-us;q=0.2;*' . "\r\n"
diff --git a/bridges/GoogleSearchBridge.php b/bridges/GoogleSearchBridge.php
index a76b26db..1745922e 100644
--- a/bridges/GoogleSearchBridge.php
+++ b/bridges/GoogleSearchBridge.php
@@ -35,7 +35,7 @@ class GoogleSearchBridge extends BridgeAbstract{
if (isset($param['q'])) { /* keyword search mode */
$this->request = $param['q'];
- $html = file_get_html('https://www.google.com/search?q=' . urlencode($this->request) . '&num=100&complete=0&tbs=qdr:y,sbd:1') or $this->returnError('No results for this query.', 404);
+ $html = $this->file_get_html('https://www.google.com/search?q=' . urlencode($this->request) . '&num=100&complete=0&tbs=qdr:y,sbd:1') or $this->returnError('No results for this query.', 404);
}
else{
$this->returnError('You must specify a keyword (?q=...).', 400);
diff --git a/bridges/GuruMedBridge.php b/bridges/GuruMedBridge.php
index de836cb3..7a72a83e 100644
--- a/bridges/GuruMedBridge.php
+++ b/bridges/GuruMedBridge.php
@@ -19,11 +19,11 @@ class GuruMedBridge extends BridgeAbstract{
return $string;
}
function GurumedExtractContent($url) {
- $html2 = file_get_html($url);
+ $html2 = $this->file_get_html($url);
$text = $html2->find('div.entry', 0)->innertext;
return $text;
}
- $html = file_get_html('http://gurumed.org/feed') or $this->returnError('Could not request Gurumed.', 404);
+ $html = $this->file_get_html('http://gurumed.org/feed') or $this->returnError('Could not request Gurumed.', 404);
$limit = 0;
foreach($html->find('item') as $element) {
diff --git a/bridges/HDWallpapersBridge.php b/bridges/HDWallpapersBridge.php
index 0fc9aaaf..45a6deb9 100644
--- a/bridges/HDWallpapersBridge.php
+++ b/bridges/HDWallpapersBridge.php
@@ -48,7 +48,7 @@ class HDWallpapersBridge extends BridgeAbstract {
for ($page = 1; $page <= $lastpage; $page++) {
$link = $baseUri.'/'.$category.'/page/'.$page;
- $html = file_get_html($link) or $this->returnError('No results for this query.', 404);
+ $html = $this->file_get_html($link) or $this->returnError('No results for this query.', 404);
if ($page === 1) {
preg_match('/page\/(\d+)$/', $html->find('.pagination a', -2)->href, $matches);
diff --git a/bridges/HentaiHavenBridge.php b/bridges/HentaiHavenBridge.php
index 79da6f8e..a1e938eb 100644
--- a/bridges/HentaiHavenBridge.php
+++ b/bridges/HentaiHavenBridge.php
@@ -12,7 +12,7 @@ class HentaiHavenBridge extends BridgeAbstract{
}
public function collectData(array $param){
- $html = file_get_html('http://hentaihaven.org/') or $this->returnError('Could not request Hentai Haven.', 404);
+ $html = $this->file_get_html('http://hentaihaven.org/') or $this->returnError('Could not request Hentai Haven.', 404);
foreach($html->find('div.zoe-grid') as $element) {
$item = new \Item();
$item->uri = $this->getURI().$element->find('div.brick-content h3 a', 0)->href;
diff --git a/bridges/IdenticaBridge.php b/bridges/IdenticaBridge.php
index c5562ee1..08ade2d6 100644
--- a/bridges/IdenticaBridge.php
+++ b/bridges/IdenticaBridge.php
@@ -25,7 +25,7 @@ class IdenticaBridge extends BridgeAbstract{
$html = '';
if (isset($param['u'])) { /* user timeline mode */
$this->request = $param['u'];
- $html = file_get_html('https://identi.ca/'.urlencode($this->request)) or $this->returnError('Requested username can\'t be found.', 404);
+ $html = $this->file_get_html('https://identi.ca/'.urlencode($this->request)) or $this->returnError('Requested username can\'t be found.', 404);
}
else {
$this->returnError('You must specify an Identica username (?u=...).', 400);
diff --git a/bridges/InstagramBridge.php b/bridges/InstagramBridge.php
index a137eee6..b39b7e03 100644
--- a/bridges/InstagramBridge.php
+++ b/bridges/InstagramBridge.php
@@ -25,7 +25,7 @@ class InstagramBridge extends BridgeAbstract{
$html = '';
if (isset($param['u'])) { /* user timeline mode */
$this->request = $param['u'];
- $html = file_get_html('http://instagram.com/'.urlencode($this->request)) or $this->returnError('Could not request Instagram.', 404);
+ $html = $this->file_get_html('http://instagram.com/'.urlencode($this->request)) or $this->returnError('Could not request Instagram.', 404);
}
else {
$this->returnError('You must specify a Instagram username (?u=...).', 400);
diff --git a/bridges/JapanExpoBridge.php b/bridges/JapanExpoBridge.php
index c8227ae7..2d38726a 100644
--- a/bridges/JapanExpoBridge.php
+++ b/bridges/JapanExpoBridge.php
@@ -59,7 +59,7 @@ class JapanExpoBridge extends BridgeAbstract{
};
$link = 'http://www.japan-expo-paris.com/fr/actualites';
- $html = file_get_html($link) or $this->returnError('Could not request JapanExpo: '.$link , 500);
+ $html = $this->file_get_html($link) or $this->returnError('Could not request JapanExpo: '.$link , 500);
$fullcontent = (!empty($param['mode']) && $param['mode'] == 'full');
$count = 0;
@@ -73,7 +73,7 @@ class JapanExpoBridge extends BridgeAbstract{
if ($fullcontent) {
if ($count < 5) {
- $article_html = file_get_html($url) or $this->returnError('Could not request JapanExpo: '.$url , 500);
+ $article_html = $this->file_get_html($url) or $this->returnError('Could not request JapanExpo: '.$url , 500);
$header = $article_html->find('header.pageHeadBox', 0);
$timestamp = strtotime($header->find('time', 0)->datetime);
$title_html = $header->find('div.section', 0)->next_sibling();
diff --git a/bridges/KonachanBridge.php b/bridges/KonachanBridge.php
index 7c4e8623..00de4385 100644
--- a/bridges/KonachanBridge.php
+++ b/bridges/KonachanBridge.php
@@ -31,7 +31,7 @@ class KonachanBridge extends BridgeAbstract{
if (isset($param['t'])) {
$tags = urlencode($param['t']);
}
- $html = file_get_html("http://konachan.com/post?page=$page&tags=$tags") or $this->returnError('Could not request Konachan.', 404);
+ $html = $this->file_get_html("http://konachan.com/post?page=$page&tags=$tags") or $this->returnError('Could not request Konachan.', 404);
$input_json = explode('Post.register(', $html);
foreach($input_json as $element)
$data[] = preg_replace('/}\)(.*)/', '}', $element);
diff --git a/bridges/KoreusBridge.php b/bridges/KoreusBridge.php
index af99bf20..0be4b5cf 100644
--- a/bridges/KoreusBridge.php
+++ b/bridges/KoreusBridge.php
@@ -19,12 +19,12 @@ class KoreusBridge extends BridgeAbstract{
return $string;
}
function KoreusExtractContent($url) {
- $html2 = file_get_html($url);
+ $html2 = $this->file_get_html($url);
$text = $html2->find('p[class=itemText]', 0)->innertext;
$text = utf8_encode(preg_replace('/(Sur le m.+?)+$/i','',$text));
return $text;
}
- $html = file_get_html('http://feeds.feedburner.com/Koreus-articles') or $this->returnError('Could not request Koreus.', 404);
+ $html = $this->file_get_html('http://feeds.feedburner.com/Koreus-articles') or $this->returnError('Could not request Koreus.', 404);
$limit = 0;
foreach($html->find('item') as $element) {
diff --git a/bridges/LeBonCoinBridge.php b/bridges/LeBonCoinBridge.php
index ff621f12..14ca16fd 100755
--- a/bridges/LeBonCoinBridge.php
+++ b/bridges/LeBonCoinBridge.php
@@ -239,7 +239,7 @@ class LeBonCoinBridge extends BridgeAbstract{
else {
$link = 'http://www.leboncoin.fr/' . $param['c'] . '/offres/' . $param['r'] . '/?f=a&th=1&q=' . urlencode($param['k']);
}
- $html = file_get_html($link) or $this->returnError('Could not request LeBonCoin.', 404);
+ $html = $this->file_get_html($link) or $this->returnError('Could not request LeBonCoin.', 404);
$list = $html->find('.tabsContent', 0);
if($list === NULL) {
diff --git a/bridges/LeJournalDuGeekBridge.php b/bridges/LeJournalDuGeekBridge.php
index 5ed3b5e5..04de7a44 100644
--- a/bridges/LeJournalDuGeekBridge.php
+++ b/bridges/LeJournalDuGeekBridge.php
@@ -20,7 +20,7 @@ class LeJournalDuGeekBridge extends BridgeAbstract{
}
function LeJournalDuGeekExtractContent($url) {
- $articleHTMLContent = file_get_html($url);
+ $articleHTMLContent = $this->file_get_html($url);
$text = $text.$articleHTMLContent->find('div.post-content', 0)->innertext;
foreach($articleHTMLContent->find('a.more') as $element) {
if ($element->innertext == "Source") {
@@ -38,7 +38,7 @@ class LeJournalDuGeekBridge extends BridgeAbstract{
return $text;
}
- $rssFeed = file_get_html('http://www.journaldugeek.com/rss') or $this->returnError('Could not request http://www.journaldugeek.com/rss', 404);
+ $rssFeed = $this->file_get_html('http://www.journaldugeek.com/rss') or $this->returnError('Could not request http://www.journaldugeek.com/rss', 404);
$limit = 0;
foreach($rssFeed->find('item') as $element) {
diff --git a/bridges/LeMondeInformatiqueBridge.php b/bridges/LeMondeInformatiqueBridge.php
index e2ba4636..f3739380 100644
--- a/bridges/LeMondeInformatiqueBridge.php
+++ b/bridges/LeMondeInformatiqueBridge.php
@@ -34,7 +34,7 @@ class LeMondeInformatiqueBridge extends BridgeAbstract {
}
$feedUrl = 'http://www.lemondeinformatique.fr/rss/rss.xml';
- $html = file_get_html($feedUrl) or $this->returnError('Could not request LeMondeInformatique: '.$feedUrl, 500);
+ $html = $this->file_get_html($feedUrl) or $this->returnError('Could not request LeMondeInformatique: '.$feedUrl, 500);
$limit = 0;
foreach($html->find('item') as $element) {
@@ -44,7 +44,7 @@ class LeMondeInformatiqueBridge extends BridgeAbstract {
$article_uri = $element->innertext;
$article_uri = substr($article_uri, strpos($article_uri, '') + 6);
$article_uri = substr($article_uri, 0, strpos($article_uri, ''));
- $article_html = file_get_html($article_uri) or $this->returnError('Could not request LeMondeInformatique: '.$article_uri, 500);
+ $article_html = $this->file_get_html($article_uri) or $this->returnError('Could not request LeMondeInformatique: '.$article_uri, 500);
$thumbnailUri = $article_html->find('div#article', 0)->find('img#illustration', 0)->src;
$article_content = CleanArticle($article_html->find('div#article', 0)->innertext);
$article_title = $article_html->find('h1.cleanprint-title', 0)->plaintext;
diff --git a/bridges/LeMotDuJourBridge.php b/bridges/LeMotDuJourBridge.php
index 8ea8ee61..d1215941 100644
--- a/bridges/LeMotDuJourBridge.php
+++ b/bridges/LeMotDuJourBridge.php
@@ -19,11 +19,11 @@ class LeMotDuJourBridge extends BridgeAbstract{
return $string;
}
function ExtractContent($url) {
- $html2 = file_get_html($url);
+ $html2 = $this->file_get_html($url);
$text = $html2->find('div.single-contenu', 0)->innertext;
return $text;
}
- $html = file_get_html('http://feeds2.feedburner.com/lemotdujour/lemotdujour') or $this->returnError('Could not request LeMotDuJour.', 404);
+ $html = $this->file_get_html('http://feeds2.feedburner.com/lemotdujour/lemotdujour') or $this->returnError('Could not request LeMotDuJour.', 404);
$limit = 0;
foreach($html->find('item') as $element) {
diff --git a/bridges/LesJoiesDuCodeBridge.php b/bridges/LesJoiesDuCodeBridge.php
index 2dd1c44b..ddacb93a 100644
--- a/bridges/LesJoiesDuCodeBridge.php
+++ b/bridges/LesJoiesDuCodeBridge.php
@@ -12,7 +12,7 @@ class LesJoiesDuCodeBridge extends BridgeAbstract{
}
public function collectData(array $param){
- $html = file_get_html('http://lesjoiesducode.fr/') or $this->returnError('Could not request LesJoiesDuCode.', 404);
+ $html = $this->file_get_html('http://lesjoiesducode.fr/') or $this->returnError('Could not request LesJoiesDuCode.', 404);
foreach($html->find('div.blog-post') as $element) {
$item = new Item();
diff --git a/bridges/LichessBridge.php b/bridges/LichessBridge.php
index 97fddc3a..88aab12d 100644
--- a/bridges/LichessBridge.php
+++ b/bridges/LichessBridge.php
@@ -13,7 +13,7 @@ class LichessBridge extends BridgeAbstract
public function collectData(array $param)
{
- $xml_feed = file_get_html('http://fr.lichess.org/blog.atom') or $this->returnError('Could not retrieve Lichess blog feed.', 404);
+ $xml_feed = $this->file_get_html('http://fr.lichess.org/blog.atom') or $this->returnError('Could not retrieve Lichess blog feed.', 404);
$posts_loaded = 0;
foreach($xml_feed->find('entry') as $entry)
@@ -37,7 +37,7 @@ class LichessBridge extends BridgeAbstract
private function retrieve_lichess_post($blog_post_uri)
{
- $blog_post_html = file_get_html($blog_post_uri);
+ $blog_post_html = $this->file_get_html($blog_post_uri);
$blog_post_div = $blog_post_html->find('#lichess_blog', 0);
$post_chapo = $blog_post_div->find('.shortlede', 0)->innertext;
diff --git a/bridges/LinkedInCompany.php b/bridges/LinkedInCompany.php
index 476cfc81..b7a49bd6 100644
--- a/bridges/LinkedInCompany.php
+++ b/bridges/LinkedInCompany.php
@@ -22,7 +22,7 @@ class LinkedInCompany extends BridgeAbstract{
$html = '';
$link = 'https://www.linkedin.com/company/'.$param[c];
- $html = file_get_html($link) or $this->returnError('Could not request LinkedIn.', 404);
+ $html = $this->file_get_html($link) or $this->returnError('Could not request LinkedIn.', 404);
foreach($html->find('//*[@id="my-feed-post"]/li') as $element) {
$title = $element->find('span.share-body', 0)->innertext;
diff --git a/bridges/LolibooruBridge.php b/bridges/LolibooruBridge.php
index 38fe4757..37e06f32 100644
--- a/bridges/LolibooruBridge.php
+++ b/bridges/LolibooruBridge.php
@@ -32,7 +32,7 @@ class LolibooruBridge extends BridgeAbstract{
if (isset($param['t'])) {
$tags = urlencode($param['t']);
}
- $html = file_get_html("http://lolibooru.moe/post?page=$page&tags=$tags") or $this->returnError('Could not request Lolibooru.', 404);
+ $html = $this->file_get_html("http://lolibooru.moe/post?page=$page&tags=$tags") or $this->returnError('Could not request Lolibooru.', 404);
$input_json = explode('Post.register(', $html);
foreach($input_json as $element)
$data[] = preg_replace('/}\)(.*)/', '}', $element);
diff --git a/bridges/MalikiBridge.php b/bridges/MalikiBridge.php
index de871200..4732c854 100644
--- a/bridges/MalikiBridge.php
+++ b/bridges/MalikiBridge.php
@@ -12,14 +12,14 @@ class MalikiBridge extends BridgeAbstract{
}
public function collectData(array $param){
- $html = file_get_html('http://www.maliki.com/') or $this->returnError('Could not request Maliki.', 404);
+ $html = $this->file_get_html('http://www.maliki.com/') or $this->returnError('Could not request Maliki.', 404);
$count=0;
$latest=1; $latest_title="";
$latest = $html->find('div.conteneur_page a', 1)->href;
$latest_title = $html->find('div.conteneur_page img', 0)->title;
function MalikiExtractContent($url) {
- $html2 = file_get_html($url);
+ $html2 = $this->file_get_html($url);
$text = 'http://www.maliki.com/'.$html2->find('img', 0)->src;
$text = '
'.$html2->find('div.imageetnews', 0)->plaintext;
return $text;
diff --git a/bridges/MemoLinuxBridge.php b/bridges/MemoLinuxBridge.php
index 02d7ac70..443740d5 100644
--- a/bridges/MemoLinuxBridge.php
+++ b/bridges/MemoLinuxBridge.php
@@ -20,7 +20,7 @@ class MemoLinuxBridge extends BridgeAbstract{
}
function ExtractContent($url) {
- $html2 = file_get_html($url);
+ $html2 = $this->file_get_html($url);
$text = $html2->find('div.entry-content', 0)->innertext;
$text = preg_replace('@@si', '', $text);
$text = preg_replace('@]*?>.*?
@si', '', $text);
@@ -28,7 +28,7 @@ class MemoLinuxBridge extends BridgeAbstract{
return $text;
}
- $html = file_get_html('http://memo-linux.com/feed/') or $this->returnError('Could not request MemoLinux.', 404);
+ $html = $this->file_get_html('http://memo-linux.com/feed/') or $this->returnError('Could not request MemoLinux.', 404);
$limit = 0;
foreach($html->find('item') as $element) {
diff --git a/bridges/MilbooruBridge.php b/bridges/MilbooruBridge.php
index cc8e9da3..eb1e133a 100644
--- a/bridges/MilbooruBridge.php
+++ b/bridges/MilbooruBridge.php
@@ -31,7 +31,7 @@ class MilbooruBridge extends BridgeAbstract{
if (isset($param['t'])) {
$tags = urlencode($param['t']);
}
- $html = file_get_html("http://sheslostcontrol.net/moe/shimmie/index.php?q=/post/list/$tags/$page") or $this->returnError('Could not request Milbooru.', 404);
+ $html = $this->file_get_html("http://sheslostcontrol.net/moe/shimmie/index.php?q=/post/list/$tags/$page") or $this->returnError('Could not request Milbooru.', 404);
foreach($html->find('div[class=shm-image-list] span[class=thumb]') as $element) {
diff --git a/bridges/MondeDiploBridge.php b/bridges/MondeDiploBridge.php
index 3774be86..5eb5d8ff 100644
--- a/bridges/MondeDiploBridge.php
+++ b/bridges/MondeDiploBridge.php
@@ -14,7 +14,7 @@ class MondeDiploBridge extends BridgeAbstract{
public function collectData(array $param){
$link = 'http://www.monde-diplomatique.fr';
- $html = file_get_html($link) or $this->returnError('Could not request MondeDiplo. for : ' . $link , 404);
+ $html = $this->file_get_html($link) or $this->returnError('Could not request MondeDiplo. for : ' . $link , 404);
foreach($html->find('div.laune') as $element) {
$item = new Item();
diff --git a/bridges/MsnMondeBridge.php b/bridges/MsnMondeBridge.php
index 1a63da63..fab3b253 100644
--- a/bridges/MsnMondeBridge.php
+++ b/bridges/MsnMondeBridge.php
@@ -14,12 +14,12 @@ class MsnMondeBridge extends BridgeAbstract{
public function collectData(array $param){
function MsnMondeExtractContent($url, &$item) {
- $html2 = file_get_html($url);
+ $html2 = $this->file_get_html($url);
$item->content = $html2->find('#content', 0)->find('article', 0)->find('section', 0)->plaintext;
$item->timestamp = strtotime($html2->find('.authorinfo-txt', 0)->find('time', 0)->datetime);
}
- $html = file_get_html('http://www.msn.com/fr-fr/actualite/monde') or $this->returnError('Could not request MsnMonde.', 404);
+ $html = $this->file_get_html('http://www.msn.com/fr-fr/actualite/monde') or $this->returnError('Could not request MsnMonde.', 404);
$limit = 0;
foreach($html->find('.smalla') as $article) {
if($limit < 10) {
diff --git a/bridges/MspabooruBridge.php b/bridges/MspabooruBridge.php
index 04c378df..caac0955 100644
--- a/bridges/MspabooruBridge.php
+++ b/bridges/MspabooruBridge.php
@@ -34,7 +34,7 @@ class MspabooruBridge extends BridgeAbstract{
if (isset($param['t'])) {
$tags = urlencode($param['t']);
}
- $html = file_get_html("http://mspabooru.com/index.php?page=post&s=list&tags=$tags&pid=$page") or $this->returnError('Could not request Mspabooru.', 404);
+ $html = $this->file_get_html("http://mspabooru.com/index.php?page=post&s=list&tags=$tags&pid=$page") or $this->returnError('Could not request Mspabooru.', 404);
foreach($html->find('div[class=content] span') as $element) {
diff --git a/bridges/NakedSecurityBridge.php b/bridges/NakedSecurityBridge.php
index ec2eeb90..b785764c 100644
--- a/bridges/NakedSecurityBridge.php
+++ b/bridges/NakedSecurityBridge.php
@@ -36,7 +36,7 @@ class NakedSecurityBridge extends BridgeAbstract {
}
$feedUrl = 'https://feeds.feedburner.com/nakedsecurity?format=xml';
- $html = file_get_html($feedUrl) or $this->returnError('Could not request '.$this->getName().': '.$feedUrl, 500);
+ $html = $this->file_get_html($feedUrl) or $this->returnError('Could not request '.$this->getName().': '.$feedUrl, 500);
$limit = 0;
foreach ($html->find('item') as $element) {
@@ -44,7 +44,7 @@ class NakedSecurityBridge extends BridgeAbstract {
//Retrieve article Uri and get that page
$article_uri = $element->find('guid', 0)->plaintext;
- $article_html = file_get_html($article_uri) or $this->returnError('Could not request '.$this->getName().': '.$article_uri, 500);
+ $article_html = $this->file_get_html($article_uri) or $this->returnError('Could not request '.$this->getName().': '.$article_uri, 500);
//Build article contents from corresponding elements
$article_title = trim($element->find('title', 0)->plaintext);
diff --git a/bridges/NasaApodBridge.php b/bridges/NasaApodBridge.php
index 63c8c93e..9da120a9 100644
--- a/bridges/NasaApodBridge.php
+++ b/bridges/NasaApodBridge.php
@@ -13,7 +13,7 @@ class NasaApodBridge extends BridgeAbstract{
public function collectData(array $param) {
- $html = file_get_html('http://apod.nasa.gov/apod/archivepix.html') or $this->returnError('Error while downloading the website content', 404);
+ $html = $this->file_get_html('http://apod.nasa.gov/apod/archivepix.html') or $this->returnError('Error while downloading the website content', 404);
$list = explode("
", $html->find('b', 0)->innertext);
for($i = 0; $i < 3;$i++)
@@ -25,7 +25,7 @@ class NasaApodBridge extends BridgeAbstract{
$uri = 'http://apod.nasa.gov/apod/'.$uri_page;
$item->uri = $uri;
- $picture_html = file_get_html($uri);
+ $picture_html = $this->file_get_html($uri);
$picture_html_string = $picture_html->innertext;
//Extract image and explanation
diff --git a/bridges/NeuviemeArtBridge.php b/bridges/NeuviemeArtBridge.php
index d558b2d3..07b85a96 100644
--- a/bridges/NeuviemeArtBridge.php
+++ b/bridges/NeuviemeArtBridge.php
@@ -20,7 +20,7 @@ class NeuviemeArtBridge extends BridgeAbstract {
}
$feedUrl = 'http://www.9emeart.fr/9emeart.rss';
- $html = file_get_html($feedUrl) or $this->returnError('Could not request 9eme Art: '.$feedUrl, 500);
+ $html = $this->file_get_html($feedUrl) or $this->returnError('Could not request 9eme Art: '.$feedUrl, 500);
$limit = 0;
foreach ($html->find('item') as $element) {
@@ -28,7 +28,7 @@ class NeuviemeArtBridge extends BridgeAbstract {
//Retrieve article Uri and get that page
$article_uri = $element->find('guid', 0)->plaintext;
- $article_html = file_get_html($article_uri) or $this->returnError('Could not request 9eme Art: '.$article_uri, 500);
+ $article_html = $this->file_get_html($article_uri) or $this->returnError('Could not request 9eme Art: '.$article_uri, 500);
//Build article contents from corresponding elements
$article_title = trim($element->find('title', 0)->plaintext);
diff --git a/bridges/NextInpactBridge.php b/bridges/NextInpactBridge.php
index 107f3e72..e229c688 100644
--- a/bridges/NextInpactBridge.php
+++ b/bridges/NextInpactBridge.php
@@ -20,7 +20,7 @@ class NextInpactBridge extends BridgeAbstract {
}
function ExtractContent($url) {
- $html2 = file_get_html($url);
+ $html2 = $this->file_get_html($url);
$text = ''.$html2->find('span.sub_title', 0)->innertext.'
'
.''
.''.$html2->find('div[itemprop=articleBody]', 0)->innertext.'
';
@@ -30,7 +30,7 @@ class NextInpactBridge extends BridgeAbstract {
return $text;
}
- $html = file_get_html('http://www.nextinpact.com/rss/news.xml') or $this->returnError('Could not request NextInpact.', 404);
+ $html = $this->file_get_html('http://www.nextinpact.com/rss/news.xml') or $this->returnError('Could not request NextInpact.', 404);
$limit = 0;
foreach($html->find('item') as $element) {
diff --git a/bridges/NiceMatinBridge.php b/bridges/NiceMatinBridge.php
index bbfe4d83..2bf824d2 100644
--- a/bridges/NiceMatinBridge.php
+++ b/bridges/NiceMatinBridge.php
@@ -22,13 +22,13 @@ class NiceMatinBridge extends BridgeAbstract{
}
function NiceMatinExtractContent($url) {
- $html2 = file_get_html($url);
+ $html2 = $this->file_get_html($url);
$text = $html2->find('figure[itemprop=associatedMedia]', 0)->innertext;
$text .= $html2->find('div[id=content-article]', 0)->innertext;
return $text;
}
- $html = file_get_html('http://www.nicematin.com/derniere-minute/rss') or $this->returnError('Could not request NiceMatin.', 404);
+ $html = $this->file_get_html('http://www.nicematin.com/derniere-minute/rss') or $this->returnError('Could not request NiceMatin.', 404);
$limit = 0;
foreach($html->find('item') as $element) {
diff --git a/bridges/NovelUpdatesBridge.php b/bridges/NovelUpdatesBridge.php
index f48e45d0..b5977559 100644
--- a/bridges/NovelUpdatesBridge.php
+++ b/bridges/NovelUpdatesBridge.php
@@ -26,7 +26,7 @@ class NovelUpdatesBridge extends BridgeAbstract{
if(strpos($thread['path'], 'series/') === FALSE)
$this->returnError('You must specify the novel URL.', 400);
$url = 'http://www.novelupdates.com'.$thread['path'].'';
- $fullhtml = file_get_html($url) or $this->returnError("Could not request NovelUpdates, novel not found", 404);
+ $fullhtml = $this->file_get_html($url) or $this->returnError("Could not request NovelUpdates, novel not found", 404);
$this->request = $fullhtml->find('h4.seriestitle', 0)->plaintext;
// dirty fix for nasty simpledom bug: https://github.com/sebsauvage/rss-bridge/issues/259
// forcefully removes tbody
diff --git a/bridges/NumeramaBridge.php b/bridges/NumeramaBridge.php
index f1958a40..6df7b553 100644
--- a/bridges/NumeramaBridge.php
+++ b/bridges/NumeramaBridge.php
@@ -21,14 +21,14 @@ class NumeramaBridge extends BridgeAbstract{
function NumeramaExtractContent($url)
{
- $html2 = file_get_html($url);
+ $html2 = $this->file_get_html($url);
$text = $html2->find('section[class=related-article]', 0)->innertext = ''; // remove related articles block
$text = ''; // add post picture
$text = $text.$html2->find('article[class=post-content]', 0)->innertext; // extract the post
return $text;
}
- $html = file_get_html('http://www.numerama.com/feed/') or $this->returnError('Could not request Numerama.', 404);
+ $html = $this->file_get_html('http://www.numerama.com/feed/') or $this->returnError('Could not request Numerama.', 404);
$limit = 0;
foreach($html->find('item') as $element) {
diff --git a/bridges/OpenClassroomsBridge.php b/bridges/OpenClassroomsBridge.php
index c3ae019d..f217fa9c 100644
--- a/bridges/OpenClassroomsBridge.php
+++ b/bridges/OpenClassroomsBridge.php
@@ -68,7 +68,7 @@ class OpenClassroomsBridge extends BridgeAbstract{
$html = '';
$link = 'https://openclassrooms.com/courses?categories='.$param['u'].'&title=&sort=updatedAt+desc';
- $html = file_get_html($link) or $this->returnError('Could not request OpenClassrooms.', 404);
+ $html = $this->file_get_html($link) or $this->returnError('Could not request OpenClassrooms.', 404);
foreach($html->find('.courseListItem') as $element) {
$item = new \Item();
diff --git a/bridges/OpenTheoryBridge.php b/bridges/OpenTheoryBridge.php
index ebafa330..7b8c7be5 100644
--- a/bridges/OpenTheoryBridge.php
+++ b/bridges/OpenTheoryBridge.php
@@ -19,12 +19,12 @@ class OpenTheoryBridge extends BridgeAbstract{
return $string;
}
function ExtractContent($url) {
- $html2 = file_get_html($url);
+ $html2 = $this->file_get_html($url);
$text = $html2->find('div.entry-content', 0)->innertext;
$text = preg_replace('@@si', '', $text);
return $text;
}
- $html = file_get_html('http://open1theory.com/feed') or $this->returnError('Could not request OpenTheory.', 404);
+ $html = $this->file_get_html('http://open1theory.com/feed') or $this->returnError('Could not request OpenTheory.', 404);
$limit = 0;
foreach($html->find('item') as $element) {
diff --git a/bridges/ParuVenduImmoBridge.php b/bridges/ParuVenduImmoBridge.php
index a9c38ea4..40f4eade 100644
--- a/bridges/ParuVenduImmoBridge.php
+++ b/bridges/ParuVenduImmoBridge.php
@@ -66,7 +66,7 @@ class ParuVenduImmoBridge extends BridgeAbstract
$link .= '&lo='.urlencode($param['lo']);
}
- $html = file_get_html($link) or $this->returnError('Could not request paruvendu.', 404);
+ $html = $this->file_get_html($link) or $this->returnError('Could not request paruvendu.', 404);
foreach($html->find('div.annonce a') as $element) {
diff --git a/bridges/PickyWallpapersBridge.php b/bridges/PickyWallpapersBridge.php
index 586d06aa..18d1d356 100644
--- a/bridges/PickyWallpapersBridge.php
+++ b/bridges/PickyWallpapersBridge.php
@@ -55,7 +55,7 @@ class PickyWallpapersBridge extends BridgeAbstract {
for ($page = 1; $page <= $lastpage; $page++) {
$link = $baseUri.'/'.$this->resolution.'/'.$this->category.'/'.(!empty($this->subcategory)?$this->subcategory.'/':'').'page-'.$page.'/';
- $html = file_get_html($link) or $this->returnError('No results for this query.', 404);
+ $html = $this->file_get_html($link) or $this->returnError('No results for this query.', 404);
if ($page === 1) {
preg_match('/page-(\d+)\/$/', $html->find('.pages li a', -2)->href, $matches);
diff --git a/bridges/PinterestBridge.php b/bridges/PinterestBridge.php
index 7df03c8c..7b05511a 100644
--- a/bridges/PinterestBridge.php
+++ b/bridges/PinterestBridge.php
@@ -51,12 +51,12 @@ class PinterestBridge extends BridgeAbstract{
$this->username = $param['u'];
$this->board = $param['b'];
- $html = file_get_html($this->getURI().'/'.urlencode($this->username).'/'.urlencode($this->board)) or $this->returnError('Username and/or board not found', 404);
+ $html = $this->file_get_html($this->getURI().'/'.urlencode($this->username).'/'.urlencode($this->board)) or $this->returnError('Username and/or board not found', 404);
} else if (isset($param['q']))
{
$this->query = $param['q'];
- $html = file_get_html($this->getURI().'/search/?q='.urlencode($this->query)) or $this->returnError('Could not request Pinterest.', 404);
+ $html = $this->file_get_html($this->getURI().'/search/?q='.urlencode($this->query)) or $this->returnError('Could not request Pinterest.', 404);
}
else {
diff --git a/bridges/PlanetLibreBridge.php b/bridges/PlanetLibreBridge.php
index 6cb92e4d..cccda6dc 100644
--- a/bridges/PlanetLibreBridge.php
+++ b/bridges/PlanetLibreBridge.php
@@ -14,11 +14,11 @@ class PlanetLibreBridge extends BridgeAbstract{
public function collectData(array $param){
function PlanetLibreExtractContent($url) {
- $html2 = file_get_html($url);
+ $html2 = $this->file_get_html($url);
$text = $html2->find('div[class="post-text"]', 0)->innertext;
return $text;
}
- $html = file_get_html('http://www.planet-libre.org/') or $this->returnError('Could not request PlanetLibre.', 404);
+ $html = $this->file_get_html('http://www.planet-libre.org/') or $this->returnError('Could not request PlanetLibre.', 404);
$limit = 0;
foreach($html->find('div.post') as $element) {
if($limit < 5) {
diff --git a/bridges/ProjectMGameBridge.php b/bridges/ProjectMGameBridge.php
index a3180416..b9835c95 100644
--- a/bridges/ProjectMGameBridge.php
+++ b/bridges/ProjectMGameBridge.php
@@ -14,7 +14,7 @@ class ProjectMGameBridge extends BridgeAbstract{
public function collectData(array $param){
$html = '';
- $html = file_get_html('http://projectmgame.com/en/') or $this->returnError('Error while downloading the Project M homepage', 404);
+ $html = $this->file_get_html('http://projectmgame.com/en/') or $this->returnError('Error while downloading the Project M homepage', 404);
foreach($html->find('article') as $article) {
$item = new \Item();
diff --git a/bridges/RTBFBridge.php b/bridges/RTBFBridge.php
index f1093c59..c82041bf 100644
--- a/bridges/RTBFBridge.php
+++ b/bridges/RTBFBridge.php
@@ -24,7 +24,7 @@ class RTBFBridge extends BridgeAbstract {
$count = 0;
if (isset($param['c'])) {
- $html = file_get_html('http://www.rtbf.be/auvio/emissions/detail?id='.$param['c']) or $this->returnError('Could not request RTBF.', 404);
+ $html = $this->file_get_html('http://www.rtbf.be/auvio/emissions/detail?id='.$param['c']) or $this->returnError('Could not request RTBF.', 404);
foreach($html->find('.rtbf-media-grid article') as $element) {
if($count < $limit) {
diff --git a/bridges/RaymondBridge.php b/bridges/RaymondBridge.php
index 45e4b3df..9e96a54f 100644
--- a/bridges/RaymondBridge.php
+++ b/bridges/RaymondBridge.php
@@ -18,14 +18,14 @@ class RaymondBridge extends BridgeAbstract{
return $string;
}
function raymondExtractContent($url) {
- $html2 = file_get_html($url);
+ $html2 = $this->file_get_html($url);
$text = $html2->find('div.entry-content', 0)->innertext;
$text = preg_replace('/class="ad".*/', '', $text);
$text = strip_tags($text, '');
$text = str_replace('(adsbygoogle = window.adsbygoogle || []).push({});', '', $text);
return $text;
}
- $html = file_get_html('http://www.raymond.cc/blog/feed') or $this->returnError('Could not request raymond.', 404);
+ $html = $this->file_get_html('http://www.raymond.cc/blog/feed') or $this->returnError('Could not request raymond.', 404);
$limit = 0;
foreach($html->find('item') as $element) {
if($limit < 3) {
diff --git a/bridges/Releases3DSBridge.php b/bridges/Releases3DSBridge.php
index e46955a6..abd35ad9 100644
--- a/bridges/Releases3DSBridge.php
+++ b/bridges/Releases3DSBridge.php
@@ -66,7 +66,7 @@ class Releases3DSBridge extends BridgeAbstract {
//Retrieve cover art and short desc from IGN?
$ignResult = false; $ignDescription = ''; $ignLink = ''; $ignDate = time(); $ignCoverArt = '';
$ignSearchUrl = 'http://www.ign.com/search?q='.urlencode($name);
- if ($ignResult = file_get_html($ignSearchUrl)) {
+ if ($ignResult = $this->file_get_html($ignSearchUrl)) {
$ignCoverArt = $ignResult->find('div.search-item-media', 0)->find('img', 0)->src;
$ignDesc = $ignResult->find('div.search-item-description', 0)->plaintext;
$ignLink = $ignResult->find('div.search-item-sub-title', 0)->find('a', 1)->href;
diff --git a/bridges/ReporterreBridge.php b/bridges/ReporterreBridge.php
index 7353722f..6990022e 100644
--- a/bridges/ReporterreBridge.php
+++ b/bridges/ReporterreBridge.php
@@ -14,7 +14,7 @@ class ReporterreBridge extends BridgeAbstract{
public function collectData(array $param){
function ExtractContentReporterre($url) {
- $html2 = file_get_html($url);
+ $html2 = $this->file_get_html($url);
foreach($html2->find('div[style=text-align:justify]') as $e) {
$text = $e->outertext;
}
@@ -23,7 +23,7 @@ class ReporterreBridge extends BridgeAbstract{
return $text;
}
- $html = file_get_html('http://www.reporterre.net/spip.php?page=backend') or $this->returnError('Could not request Reporterre.', 404);
+ $html = $this->file_get_html('http://www.reporterre.net/spip.php?page=backend') or $this->returnError('Could not request Reporterre.', 404);
$limit = 0;
foreach($html->find('item') as $element) {
diff --git a/bridges/Rue89Bridge.php b/bridges/Rue89Bridge.php
index d68b6ec6..92bd9e97 100644
--- a/bridges/Rue89Bridge.php
+++ b/bridges/Rue89Bridge.php
@@ -22,7 +22,7 @@ class Rue89Bridge extends BridgeAbstract{
public function collectData(array $param){
- $html = file_get_html('http://api.rue89.nouvelobs.com/feed') or $this->returnError('Could not request Rue89.', 404);
+ $html = $this->file_get_html('http://api.rue89.nouvelobs.com/feed') or $this->returnError('Could not request Rue89.', 404);
$limit = 0;
foreach($html->find('item') as $element) {
diff --git a/bridges/Rule34Bridge.php b/bridges/Rule34Bridge.php
index cda601d7..b4c30dd9 100644
--- a/bridges/Rule34Bridge.php
+++ b/bridges/Rule34Bridge.php
@@ -33,7 +33,7 @@ class Rule34Bridge extends BridgeAbstract{
if (isset($param['t'])) {
$tags = urlencode($param['t']);
}
- $html = file_get_html("http://rule34.xxx/index.php?page=post&s=list&tags=$tags&pid=$page") or $this->returnError('Could not request Rule34.', 404);
+ $html = $this->file_get_html("http://rule34.xxx/index.php?page=post&s=list&tags=$tags&pid=$page") or $this->returnError('Could not request Rule34.', 404);
foreach($html->find('div[class=content] span') as $element) {
diff --git a/bridges/Rule34pahealBridge.php b/bridges/Rule34pahealBridge.php
index 3ecab159..33716408 100644
--- a/bridges/Rule34pahealBridge.php
+++ b/bridges/Rule34pahealBridge.php
@@ -32,7 +32,7 @@ class Rule34pahealBridge extends BridgeAbstract{
if (isset($param['t'])) {
$tags = urlencode($param['t']);
}
- $html = file_get_html("http://rule34.paheal.net/post/list/$tags/$page") or $this->returnError('Could not request Rule34paheal.', 404);
+ $html = $this->file_get_html("http://rule34.paheal.net/post/list/$tags/$page") or $this->returnError('Could not request Rule34paheal.', 404);
foreach($html->find('div[class=shm-image-list] div[class=shm-thumb]') as $element) {
diff --git a/bridges/SafebooruBridge.php b/bridges/SafebooruBridge.php
index 07d702d9..63ffd1a4 100644
--- a/bridges/SafebooruBridge.php
+++ b/bridges/SafebooruBridge.php
@@ -34,7 +34,7 @@ class SafebooruBridge extends BridgeAbstract{
if (isset($param['t'])) {
$tags = urlencode($param['t']);
}
- $html = file_get_html("http://safebooru.org/index.php?page=post&s=list&tags=$tags&pid=$page") or $this->returnError('Could not request Safebooru.', 404);
+ $html = $this->file_get_html("http://safebooru.org/index.php?page=post&s=list&tags=$tags&pid=$page") or $this->returnError('Could not request Safebooru.', 404);
foreach($html->find('div[class=content] span') as $element) {
diff --git a/bridges/SakugabooruBridge.php b/bridges/SakugabooruBridge.php
index 0a99b431..d35da264 100644
--- a/bridges/SakugabooruBridge.php
+++ b/bridges/SakugabooruBridge.php
@@ -31,7 +31,7 @@ class SakugabooruBridge extends BridgeAbstract{
if (isset($param['t'])) {
$tags = urlencode($param['t']);
}
- $html = file_get_html("http://sakuga.yshi.org/post?page=$page&tags=$tags") or $this->returnError('Could not request Sakugabooru.', 404);
+ $html = $this->file_get_html("http://sakuga.yshi.org/post?page=$page&tags=$tags") or $this->returnError('Could not request Sakugabooru.', 404);
$input_json = explode('Post.register(', $html);
foreach($input_json as $element)
$data[] = preg_replace('/}\)(.*)/', '}', $element);
diff --git a/bridges/ScilogsBridge.php b/bridges/ScilogsBridge.php
index 99c7eb24..ee634b39 100644
--- a/bridges/ScilogsBridge.php
+++ b/bridges/ScilogsBridge.php
@@ -19,11 +19,11 @@ class ScilogsBridge extends BridgeAbstract{
return $string;
}
function ScilogsExtractContent($url) {
- $html2 = file_get_html($url);
+ $html2 = $this->file_get_html($url);
$text = $html2->find('div.entrybody', 0)->innertext;
return $text;
}
- $html = file_get_html('http://www.scilogs.fr/?wpmu-feed=posts') or $this->returnError('Could not request Scilogs.', 404);
+ $html = $this->file_get_html('http://www.scilogs.fr/?wpmu-feed=posts') or $this->returnError('Could not request Scilogs.', 404);
$limit = 0;
foreach($html->find('item') as $element) {
diff --git a/bridges/ScmbBridge.php b/bridges/ScmbBridge.php
index dd2fa0dc..6cf96737 100644
--- a/bridges/ScmbBridge.php
+++ b/bridges/ScmbBridge.php
@@ -13,7 +13,7 @@ class ScmbBridge extends BridgeAbstract{
public function collectData(array $param){
$html = '';
- $html = file_get_html('http://secouchermoinsbete.fr/') or $this->returnError('Could not request Se Coucher Moins Bete.', 404);
+ $html = $this->file_get_html('http://secouchermoinsbete.fr/') or $this->returnError('Could not request Se Coucher Moins Bete.', 404);
foreach($html->find('article') as $article) {
$item = new \Item();
diff --git a/bridges/ScoopItBridge.php b/bridges/ScoopItBridge.php
index 65511a44..da439de7 100644
--- a/bridges/ScoopItBridge.php
+++ b/bridges/ScoopItBridge.php
@@ -25,7 +25,7 @@ class ScoopItBridge extends BridgeAbstract{
$this->request = $param['u'];
$link = 'http://scoop.it/search?q=' .urlencode($this->request);
- $html = file_get_html($link) or $this->returnError('Could not request ScoopIt. for : ' . $link , 404);
+ $html = $this->file_get_html($link) or $this->returnError('Could not request ScoopIt. for : ' . $link , 404);
foreach($html->find('div.post-view') as $element) {
$item = new Item();
diff --git a/bridges/SegfaultMintBridge.php b/bridges/SegfaultMintBridge.php
index a2cbc20d..b5e9d521 100644
--- a/bridges/SegfaultMintBridge.php
+++ b/bridges/SegfaultMintBridge.php
@@ -19,12 +19,12 @@ class SegfaultMintBridge extends BridgeAbstract{
return $string;
}
function ExtractContent($url) {
- $html2 = file_get_html($url);
+ $html2 = $this->file_get_html($url);
$text = $html2->find('div.post-bodycopy', 0)->innertext;
$text = preg_replace('@@si', '', $text);
return $text;
}
- $html = file_get_html('http://segfault.linuxmint.com/feed/') or $this->returnError('Could not request segfault.', 404);
+ $html = $this->file_get_html('http://segfault.linuxmint.com/feed/') or $this->returnError('Could not request segfault.', 404);
$limit = 0;
foreach($html->find('item') as $element) {
diff --git a/bridges/Sexactu.php b/bridges/Sexactu.php
index c820f5ed..92f4d9fe 100644
--- a/bridges/Sexactu.php
+++ b/bridges/Sexactu.php
@@ -16,7 +16,7 @@ class Sexactu extends BridgeAbstract{
$find = array('janvier', 'février', 'mars', 'avril', 'mai', 'juin', 'juillet', 'août', 'septembre', 'novembre', 'décembre');
$replace = array('January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December');
- $html = file_get_html($this->getURI()) or $this->returnError('Could not request '.$this->getURI(), 404);
+ $html = $this->file_get_html($this->getURI()) or $this->returnError('Could not request '.$this->getURI(), 404);
foreach($html->find('.content-holder') as $contentHolder) {
// only use first list as second one only contains pages numbers
diff --git a/bridges/SiliconBridge.php b/bridges/SiliconBridge.php
index 27e0e91d..b715ba7f 100644
--- a/bridges/SiliconBridge.php
+++ b/bridges/SiliconBridge.php
@@ -20,7 +20,7 @@ class SiliconBridge extends BridgeAbstract {
}
$feedUrl = 'http://www.silicon.fr/feed';
- $html = file_get_html($feedUrl) or $this->returnError('Could not request Silicon: '.$feedUrl, 500);
+ $html = $this->file_get_html($feedUrl) or $this->returnError('Could not request Silicon: '.$feedUrl, 500);
$limit = 0;
foreach($html->find('item') as $element) {
@@ -30,7 +30,7 @@ class SiliconBridge extends BridgeAbstract {
$article_uri = $element->innertext;
$article_uri = substr($article_uri, strpos($article_uri, '') + 6);
$article_uri = substr($article_uri, 0, strpos($article_uri, ''));
- $article_html = file_get_html($article_uri) or $this->returnError('Could not request Silicon: '.$article_uri, 500);
+ $article_html = $this->file_get_html($article_uri) or $this->returnError('Could not request Silicon: '.$article_uri, 500);
//Build article contents from corresponding elements
$thumbnailUri = $element->find('enclosure', 0)->url;
diff --git a/bridges/SuperbWallpapersBridge.php b/bridges/SuperbWallpapersBridge.php
index c996d790..f9b0a5c8 100644
--- a/bridges/SuperbWallpapersBridge.php
+++ b/bridges/SuperbWallpapersBridge.php
@@ -47,12 +47,12 @@ class SuperbWallpapersBridge extends BridgeAbstract {
// Get last page number
$link = $baseUri.'/'.$this->category.'/9999.html';
- $html = file_get_html($link);
+ $html = $this->file_get_html($link);
$lastpage = min($html->find('.paging .cpage', 0)->innertext(), ceil($max/36));
for ($page = 1; $page <= $lastpage; $page++) {
$link = $baseUri.'/'.$this->category.'/'.$page.'.html';
- $html = file_get_html($link) or $this->returnError('No results for this query.', 404);
+ $html = $this->file_get_html($link) or $this->returnError('No results for this query.', 404);
foreach($html->find('.wpl .i a') as $element) {
$thumbnail = $element->find('img', 0);
diff --git a/bridges/T411Bridge.php b/bridges/T411Bridge.php
index 92f3c764..47815beb 100644
--- a/bridges/T411Bridge.php
+++ b/bridges/T411Bridge.php
@@ -36,7 +36,7 @@ class T411Bridge extends BridgeAbstract {
//Retrieve torrent listing from search results, which does not contain torrent description
$url = $this->getURI().'torrents/search/?'.$param['search'].'&order=added&type=desc';
- $html = file_get_html($url) or $this->returnError('Could not request t411: '.$url, 500);
+ $html = $this->file_get_html($url) or $this->returnError('Could not request t411: '.$url, 500);
$results = $html->find('table.results', 0);
if (is_null($results))
$this->returnError('No results from t411: '.$url, 500);
@@ -57,7 +57,7 @@ class T411Bridge extends BridgeAbstract {
$item_date = strtotime($element->find('dd', 0)->plaintext);
//Retrieve full description from torrent page
- if ($item_html = file_get_html($item_uri)) {
+ if ($item_html = $this->file_get_html($item_uri)) {
//Retrieve data from page contents
$item_desc = $item_html->find('div.description', 0);
diff --git a/bridges/TagBoardBridge.php b/bridges/TagBoardBridge.php
index 0a740b1c..30a950b3 100644
--- a/bridges/TagBoardBridge.php
+++ b/bridges/TagBoardBridge.php
@@ -24,7 +24,7 @@ class TagBoardBridge extends BridgeAbstract{
$this->request = $param['u'];
$link = 'https://post-cache.tagboard.com/search/' .$this->request;
- $html = file_get_html($link) or $this->returnError('Could not request TagBoard for : ' . $link , 404);
+ $html = $this->file_get_html($link) or $this->returnError('Could not request TagBoard for : ' . $link , 404);
$parsed_json = json_decode($html);
foreach($parsed_json->{'posts'} as $element) {
diff --git a/bridges/TbibBridge.php b/bridges/TbibBridge.php
index cca0b0b0..7490c869 100644
--- a/bridges/TbibBridge.php
+++ b/bridges/TbibBridge.php
@@ -33,7 +33,7 @@ class TbibBridge extends BridgeAbstract{
if (isset($param['t'])) {
$tags = urlencode($param['t']);
}
- $html = file_get_html("http://tbib.org/index.php?page=post&s=list&tags=$tags&pid=$page") or $this->returnError('Could not request Tbib.', 404);
+ $html = $this->file_get_html("http://tbib.org/index.php?page=post&s=list&tags=$tags&pid=$page") or $this->returnError('Could not request Tbib.', 404);
foreach($html->find('div[class=content] span') as $element) {
diff --git a/bridges/TheCodingLoveBridge.php b/bridges/TheCodingLoveBridge.php
index bd2fe857..e9eef5bf 100644
--- a/bridges/TheCodingLoveBridge.php
+++ b/bridges/TheCodingLoveBridge.php
@@ -12,7 +12,7 @@ class TheCodingLoveBridge extends BridgeAbstract{
}
public function collectData(array $param){
- $html = file_get_html('http://thecodinglove.com/') or $this->returnError('Could not request The Coding Love.', 404);
+ $html = $this->file_get_html('http://thecodinglove.com/') or $this->returnError('Could not request The Coding Love.', 404);
foreach($html->find('div.post') as $element) {
$item = new Item();
diff --git a/bridges/ThePirateBayBridge.php b/bridges/ThePirateBayBridge.php
index 6c35ad80..6f6d318a 100644
--- a/bridges/ThePirateBayBridge.php
+++ b/bridges/ThePirateBayBridge.php
@@ -60,7 +60,7 @@ class ThePirateBayBridge extends BridgeAbstract{
$keywordsList = explode(";",$param['q']);
foreach($keywordsList as $keywords){
- $html = file_get_html('https://thepiratebay.org/search/'.rawurlencode($keywords).'/0/3/0') or $this->returnError('Could not request TPB.', 404);
+ $html = $this->file_get_html('https://thepiratebay.org/search/'.rawurlencode($keywords).'/0/3/0') or $this->returnError('Could not request TPB.', 404);
if ($html->find('table#searchResult', 0) == FALSE)
$this->returnError('No result for query '.$keywords, 404);
diff --git a/bridges/TuxboardBridge.php b/bridges/TuxboardBridge.php
index 63f9d092..63a1ed4b 100644
--- a/bridges/TuxboardBridge.php
+++ b/bridges/TuxboardBridge.php
@@ -20,13 +20,13 @@ class TuxboardBridge extends BridgeAbstract{
}
function ExtractContent($url) {
- $html2 = file_get_html($url);
+ $html2 = $this->file_get_html($url);
$text = $html2->find('article#page', 0)->innertext;
$text = preg_replace('@@si', '', $text);
return $text;
}
- $html = file_get_html('http://www.tuxboard.com/feed/atom/') or $this->returnError('Could not request Tuxboard.', 404);
+ $html = $this->file_get_html('http://www.tuxboard.com/feed/atom/') or $this->returnError('Could not request Tuxboard.', 404);
$limit = 0;
foreach($html->find('entry') as $element) {
diff --git a/bridges/TwitterBridge.php b/bridges/TwitterBridge.php
index 90dea5b3..ac3383ff 100644
--- a/bridges/TwitterBridge.php
+++ b/bridges/TwitterBridge.php
@@ -34,11 +34,11 @@ class TwitterBridge extends BridgeAbstract{
$html = '';
if (isset($param['q'])) { /* keyword search mode */
$this->request = $param['q'];
- $html = file_get_html('https://twitter.com/search?q='.urlencode($this->request).'&f=tweets') or $this->returnError('No results for this query.', 404);
+ $html = $this->file_get_html('https://twitter.com/search?q='.urlencode($this->request).'&f=tweets') or $this->returnError('No results for this query.', 404);
}
elseif (isset($param['u'])) { /* user timeline mode */
$this->request = $param['u'];
- $html = file_get_html('http://twitter.com/'.urlencode($this->request)) or $this->returnError('Requested username can\'t be found.', 404);
+ $html = $this->file_get_html('http://twitter.com/'.urlencode($this->request)) or $this->returnError('Requested username can\'t be found.', 404);
}
else {
$this->returnError('You must specify a keyword (?q=...) or a Twitter username (?u=...).', 400);
diff --git a/bridges/TwitterBridgeClean.php b/bridges/TwitterBridgeClean.php
index f804556c..e98b0067 100644
--- a/bridges/TwitterBridgeClean.php
+++ b/bridges/TwitterBridgeClean.php
@@ -34,11 +34,11 @@ class TwitterBridgeClean extends BridgeAbstract{
$html = '';
if (isset($param['q'])) { /* keyword search mode */
$this->request = $param['q'];
- $html = file_get_html('https://twitter.com/search?q='.urlencode($this->request).'&f=tweets') or $this->returnError('No results for this query.', 404);
+ $html = $this->file_get_html('https://twitter.com/search?q='.urlencode($this->request).'&f=tweets') or $this->returnError('No results for this query.', 404);
}
elseif (isset($param['u'])) { /* user timeline mode */
$this->request = $param['u'];
- $html = file_get_html('http://twitter.com/'.urlencode($this->request)) or $this->returnError('Requested username can\'t be found.', 404);
+ $html = $this->file_get_html('http://twitter.com/'.urlencode($this->request)) or $this->returnError('Requested username can\'t be found.', 404);
}
else {
$this->returnError('You must specify a keyword (?q=...) or a Twitter username (?u=...).', 400);
diff --git a/bridges/TwitterBridgeCleanExtended.php b/bridges/TwitterBridgeCleanExtended.php
index 5358ae04..7d2d60b5 100644
--- a/bridges/TwitterBridgeCleanExtended.php
+++ b/bridges/TwitterBridgeCleanExtended.php
@@ -34,11 +34,11 @@ class TwitterBridgeCleanExtended extends BridgeAbstract{
$html = '';
if (isset($param['q'])) { /* keyword search mode */
$this->request = $param['q'];
- $html = file_get_html('https://twitter.com/search?q='.urlencode($this->request).'&f=tweets') or $this->returnError('No results for this query.', 404);
+ $html = $this->file_get_html('https://twitter.com/search?q='.urlencode($this->request).'&f=tweets') or $this->returnError('No results for this query.', 404);
}
elseif (isset($param['u'])) { /* user timeline mode */
$this->request = $param['u'];
- $html = file_get_html('http://twitter.com/'.urlencode($this->request)) or $this->returnError('Requested username can\'t be found.', 404);
+ $html = $this->file_get_html('http://twitter.com/'.urlencode($this->request)) or $this->returnError('Requested username can\'t be found.', 404);
}
else {
$this->returnError('You must specify a keyword (?q=...) or a Twitter username (?u=...).', 400);
diff --git a/bridges/TwitterBridgeExtended.php b/bridges/TwitterBridgeExtended.php
index c87d414c..e15a0e9b 100644
--- a/bridges/TwitterBridgeExtended.php
+++ b/bridges/TwitterBridgeExtended.php
@@ -30,10 +30,10 @@ class TwitterBridgeExtended extends BridgeAbstract{
public function collectData(array $param){
$html = '';
if (isset($param['q'])) { /* keyword search mode */
- $html = file_get_html('https://twitter.com/search?q='.urlencode($param['q']).'&f=tweets') or $this->returnError('No results for this query.', 404);
+ $html = $this->file_get_html('https://twitter.com/search?q='.urlencode($param['q']).'&f=tweets') or $this->returnError('No results for this query.', 404);
}
elseif (isset($param['u'])) { /* user timeline mode */
- $html = file_get_html('https://twitter.com/'.urlencode($param['u']).'/with_replies') or $this->returnError('Requested username can\'t be found.', 404);
+ $html = $this->file_get_html('https://twitter.com/'.urlencode($param['u']).'/with_replies') or $this->returnError('Requested username can\'t be found.', 404);
}
else {
$this->returnError('You must specify a keyword (?q=...) or a Twitter username (?u=...).', 400);
diff --git a/bridges/TwitterBridgeTweaked.php b/bridges/TwitterBridgeTweaked.php
index d91a6043..e817ced0 100644
--- a/bridges/TwitterBridgeTweaked.php
+++ b/bridges/TwitterBridgeTweaked.php
@@ -86,10 +86,10 @@ class TwitterBridgeTweaked extends BridgeAbstract{
public function collectData(array $param){
$html = '';
if (isset($param['q'])) { /* keyword search mode */
- $html = file_get_html('https://twitter.com/search?q='.urlencode($param['q']).'&f=tweets') or $this->returnError('No results for this query.', 404);
+ $html = $this->file_get_html('https://twitter.com/search?q='.urlencode($param['q']).'&f=tweets') or $this->returnError('No results for this query.', 404);
}
elseif (isset($param['u'])) { /* user timeline mode */
- $html = file_get_html('https://twitter.com/'.urlencode($param['u']).'/with_replies') or $this->returnError('Requested username can\'t be found.', 404);
+ $html = $this->file_get_html('https://twitter.com/'.urlencode($param['u']).'/with_replies') or $this->returnError('Requested username can\'t be found.', 404);
}
else {
$this->returnError('You must specify a keyword (?q=...) or a Twitter username (?u=...).', 400);
diff --git a/bridges/UnsplashBridge.php b/bridges/UnsplashBridge.php
index 553b226e..2ac8ef2f 100644
--- a/bridges/UnsplashBridge.php
+++ b/bridges/UnsplashBridge.php
@@ -44,7 +44,7 @@ class UnsplashBridge extends BridgeAbstract {
for ($page = 1; $page <= $lastpage; $page++) {
$link = $baseUri.'/grid?page='.$page;
- $html = file_get_html($link) or $this->returnError('No results for this query.', 404);
+ $html = $this->file_get_html($link) or $this->returnError('No results for this query.', 404);
if ($page === 1) {
preg_match('/=(\d+)$/', $html->find('.pagination > a[!class]', -1)->href, $matches);
diff --git a/bridges/ViadeoCompany.php b/bridges/ViadeoCompany.php
index 6b474f57..325cf1aa 100644
--- a/bridges/ViadeoCompany.php
+++ b/bridges/ViadeoCompany.php
@@ -22,7 +22,7 @@ class ViadeoCompany extends BridgeAbstract{
$html = '';
$link = 'http://www.viadeo.com/fr/company/'.$param[c];
- $html = file_get_html($link) or $this->returnError('Could not request Viadeo.', 404);
+ $html = $this->file_get_html($link) or $this->returnError('Could not request Viadeo.', 404);
foreach($html->find('//*[@id="company-newsfeed"]/ul/li') as $element) {
$title = $element->find('p', 0)->innertext;
diff --git a/bridges/VineBridge.php b/bridges/VineBridge.php
index d9482e34..daf520e9 100644
--- a/bridges/VineBridge.php
+++ b/bridges/VineBridge.php
@@ -24,7 +24,7 @@ class VineBridge extends BridgeAbstract {
$html = '';
$uri = 'http://vine.co/u/'.$param['u'].'?mode=list';
- $html = file_get_html($uri) or $this->returnError('No results for this query.', 404);
+ $html = $this->file_get_html($uri) or $this->returnError('No results for this query.', 404);
foreach($html->find('.post') as $element) {
$a = $element->find('a', 0);
diff --git a/bridges/WallpaperStopBridge.php b/bridges/WallpaperStopBridge.php
index e88921c1..3379e820 100644
--- a/bridges/WallpaperStopBridge.php
+++ b/bridges/WallpaperStopBridge.php
@@ -56,7 +56,7 @@ class WallpaperStopBridge extends BridgeAbstract {
for ($page = 1; $page <= $lastpage; $page++) {
$link = $baseUri.'/'.$this->category.'-wallpaper/'.(!empty($this->subcategory)?$this->subcategory.'-wallpaper/':'').'desktop-wallpaper-'.$page.'.html';
- $html = file_get_html($link) or $this->returnError('No results for this query.', 404);
+ $html = $this->file_get_html($link) or $this->returnError('No results for this query.', 404);
if ($page === 1) {
preg_match('/-(\d+)\.html$/', $html->find('.pagination > .last', 0)->href, $matches);
diff --git a/bridges/WhydBridge.php b/bridges/WhydBridge.php
index 96c77c1f..2b9e1dd4 100644
--- a/bridges/WhydBridge.php
+++ b/bridges/WhydBridge.php
@@ -28,12 +28,12 @@ class WhydBridge extends BridgeAbstract{
{
$this->request = $param['u'];
if (strlen(preg_replace("/[^0-9a-f]/",'', $this->request)) == 24) { // is input the userid ?
- $html = file_get_html('http://www.whyd.com/u/'.preg_replace("/[^0-9a-f]/",'', $this->request)) or $this->returnError('No results for this query.', 404);
+ $html = $this->file_get_html('http://www.whyd.com/u/'.preg_replace("/[^0-9a-f]/",'', $this->request)) or $this->returnError('No results for this query.', 404);
} else { // input may be the username
- $html = file_get_html('http://www.whyd.com/search?q='.urlencode($this->request)) or $this->returnError('No results for this query.', 404);
+ $html = $this->file_get_html('http://www.whyd.com/search?q='.urlencode($this->request)) or $this->returnError('No results for this query.', 404);
for ($j = 0; $j < 5; $j++) {
if (strtolower($html->find('div.user', $j)->find('a',0)->plaintext) == strtolower($this->request)) {
- $html = file_get_html('http://www.whyd.com' . $html->find('div.user', $j)->find('a', 0)->getAttribute('href')) or $this->returnError('No results for this query', 404);
+ $html = $this->file_get_html('http://www.whyd.com' . $html->find('div.user', $j)->find('a', 0)->getAttribute('href')) or $this->returnError('No results for this query', 404);
break;
}
}
diff --git a/bridges/WikipediaDEBridge.php b/bridges/WikipediaDEBridge.php
index 79b66fe7..5bb974a8 100644
--- a/bridges/WikipediaDEBridge.php
+++ b/bridges/WikipediaDEBridge.php
@@ -18,7 +18,7 @@ class WikipediaDEBridge extends BridgeAbstract{
//$host = 'https://de.wikipedia.org';
$link = '/wiki/Wikipedia:Hauptseite';
- $html = file_get_html($host.$link) or $this->returnError('Could not request Wikipedia DE.', 404);
+ $html = $this->file_get_html($host.$link) or $this->returnError('Could not request Wikipedia DE.', 404);
$element = $html->find('div[id=mf-tfa]', 0);
$element->find('div', -1)->outertext = '';
@@ -27,7 +27,7 @@ class WikipediaDEBridge extends BridgeAbstract{
$item->uri = $host.$element->find('p', 0)->find('a', 0)->href;
$item->title = $element->find('p',0)->find('a',0)->title;
- $html2 = file_get_html($item->uri) or $this->returnError('Could not request Wikipedia DE '.$item->title.'.', 404);
+ $html2 = $this->file_get_html($item->uri) or $this->returnError('Could not request Wikipedia DE '.$item->title.'.', 404);
$element2 = $html2->find('div[id=mw-content-text]', 0);
$item->content = str_replace('href="/', 'href="'.$host.'/', $element2->innertext);
diff --git a/bridges/WikipediaENBridge.php b/bridges/WikipediaENBridge.php
index adf7b163..37f1f57a 100644
--- a/bridges/WikipediaENBridge.php
+++ b/bridges/WikipediaENBridge.php
@@ -18,7 +18,7 @@ class WikipediaENBridge extends BridgeAbstract{
//$host = 'https://en.wikipedia.org';
$link = '/wiki/Main_Page';
- $html = file_get_html($host.$link) or $this->returnError('Could not request Wikipedia EN.', 404);
+ $html = $this->file_get_html($host.$link) or $this->returnError('Could not request Wikipedia EN.', 404);
$element = $html->find('div[id=mp-tfa]', 0);
// Clean the bottom of the featured article
diff --git a/bridges/WikipediaEOBridge.php b/bridges/WikipediaEOBridge.php
index 4f0d7ad7..89050a6b 100644
--- a/bridges/WikipediaEOBridge.php
+++ b/bridges/WikipediaEOBridge.php
@@ -18,7 +18,7 @@ class WikipediaEOBridge extends BridgeAbstract{
//$host = 'https://eo.wikipedia.org';
$link = '/wiki/Vikipedio:%C4%88efpa%C4%9Do';
- $html = file_get_html($host.$link) or $this->returnError('Could not request Wikipedia EO.', 404);
+ $html = $this->file_get_html($host.$link) or $this->returnError('Could not request Wikipedia EO.', 404);
$element = $html->find('div[id=mf-tfa]', 0);
// Link to article
diff --git a/bridges/WikipediaFRBridge.php b/bridges/WikipediaFRBridge.php
index ca881968..293d7c99 100644
--- a/bridges/WikipediaFRBridge.php
+++ b/bridges/WikipediaFRBridge.php
@@ -18,7 +18,7 @@ class WikipediaFRBridge extends BridgeAbstract{
//$host = 'https://fr.wikipedia.org';
$link = '/wiki/Wikip%C3%A9dia:Accueil_principal';
- $html = file_get_html($host.$link) or $this->returnError('Could not request Wikipedia FR.', 404);
+ $html = $this->file_get_html($host.$link) or $this->returnError('Could not request Wikipedia FR.', 404);
$element = $html->find('div[id=mf-lumieresur]', 0);
# Use the "Lire la suite" link to dependably get the title of the article
diff --git a/bridges/WordPressBridge.php b/bridges/WordPressBridge.php
index 62085154..fb432862 100644
--- a/bridges/WordPressBridge.php
+++ b/bridges/WordPressBridge.php
@@ -34,7 +34,7 @@ class WordPressBridge extends BridgeAbstract {
$this->returnError('You must specify a URL', 400);
}
- $html = file_get_html($this->url) or $this->returnError("Could not request {$this->url}.", 404);
+ $html = $this->file_get_html($this->url) or $this->returnError("Could not request {$this->url}.", 404);
$posts = $html->find('.post');
if(!empty($posts) ) {
@@ -54,7 +54,7 @@ class WordPressBridge extends BridgeAbstract {
}
private function getDetails($uri, $thumbnail) {
- $html = file_get_html($uri) or exit;
+ $html = $this->file_get_html($uri) or exit;
$article = $html->find('.post', 0);
$title = $article->find('h1', 0)->innertext;
diff --git a/bridges/WorldOfTanks.php b/bridges/WorldOfTanks.php
index adaf22c3..0d7967ce 100644
--- a/bridges/WorldOfTanks.php
+++ b/bridges/WorldOfTanks.php
@@ -70,7 +70,7 @@ class WorldOfTanks extends HttpCachingBridgeAbstract{
} else {
$this->uri = WORLD_OF_TANKS.$this->lang.NEWS.'pc-browser/'.$param['category']."/";
}
- $html = file_get_html($this->getURI()) or $this->returnError('Could not request '.$this->getURI(), 404);
+ $html = $this->file_get_html($this->getURI()) or $this->returnError('Could not request '.$this->getURI(), 404);
$this->message("loaded HTML from ".$this->getURI());
// customize name
$this->name = $html->find('title', 0)->innertext;
diff --git a/bridges/XbooruBridge.php b/bridges/XbooruBridge.php
index 5e0281b9..b867987f 100644
--- a/bridges/XbooruBridge.php
+++ b/bridges/XbooruBridge.php
@@ -33,7 +33,7 @@ class XbooruBridge extends BridgeAbstract{
if (isset($param['t'])) {
$tags = urlencode($param['t']);
}
- $html = file_get_html("http://xbooru.com/index.php?page=post&s=list&tags=$tags&pid=$page") or $this->returnError('Could not request Xbooru.', 404);
+ $html = $this->file_get_html("http://xbooru.com/index.php?page=post&s=list&tags=$tags&pid=$page") or $this->returnError('Could not request Xbooru.', 404);
foreach($html->find('div[class=content] span') as $element) {
diff --git a/bridges/YandereBridge.php b/bridges/YandereBridge.php
index dd479e0b..83245e22 100644
--- a/bridges/YandereBridge.php
+++ b/bridges/YandereBridge.php
@@ -31,7 +31,7 @@ class YandereBridge extends BridgeAbstract{
if (isset($param['t'])) {
$tags = urlencode($param['t']);
}
- $html = file_get_html("https://yande.re/post?page=$page&tags=$tags") or $this->returnError('Could not request Yandere.', 404);
+ $html = $this->file_get_html("https://yande.re/post?page=$page&tags=$tags") or $this->returnError('Could not request Yandere.', 404);
$input_json = explode('Post.register(', $html);
foreach($input_json as $element)
$data[] = preg_replace('/}\)(.*)/', '}', $element);
diff --git a/bridges/YoutubeBridge.php b/bridges/YoutubeBridge.php
index b515e4f4..32004374 100644
--- a/bridges/YoutubeBridge.php
+++ b/bridges/YoutubeBridge.php
@@ -68,7 +68,7 @@ class YoutubeBridge extends BridgeAbstract {
}
private function ytBridgeQueryVideoInfo($vid, &$author, &$desc, &$time) {
- $html = file_get_html($this->getURI()."watch?v=$vid");
+ $html = $this->file_get_html($this->getURI()."watch?v=$vid");
$author = $html->innertext;
$author = substr($author, strpos($author, '"author=') + 8);
$author = substr($author, 0, strpos($author, '\u0026'));
@@ -138,9 +138,9 @@ class YoutubeBridge extends BridgeAbstract {
$url_listing = $this->getURI().'channel/'.urlencode($this->request).'/videos';
}
if (!empty($url_feed) && !empty($url_listing)) {
- if ($xml = file_get_html($url_feed)) {
+ if ($xml = $this->file_get_html($url_feed)) {
$this->ytBridgeParseXmlFeed($xml);
- } else if ($html = file_get_html($url_listing)) {
+ } else if ($html = $this->file_get_html($url_listing)) {
$this->ytBridgeParseHtmlListing($html, 'li.channels-content-item', 'h3');
} else $this->returnError("Could not request YouTube. Tried:\n - $url_feed\n - $url_listing", 500);
}
@@ -148,7 +148,7 @@ class YoutubeBridge extends BridgeAbstract {
else if (isset($param['p'])) { /* playlist mode */
$this->request = $param['p'];
$url_listing = $this->getURI().'playlist?list='.urlencode($this->request);
- $html = file_get_html($url_listing) or $this->returnError("Could not request YouTube. Tried:\n - $url_listing", 500);
+ $html = $this->file_get_html($url_listing) or $this->returnError("Could not request YouTube. Tried:\n - $url_listing", 500);
$this->ytBridgeParseHtmlListing($html, 'tr.pl-video', '.pl-video-title a');
$this->request = 'Playlist: '.str_replace(' - YouTube', '', $html->find('title', 0)->plaintext);
}
@@ -156,7 +156,7 @@ class YoutubeBridge extends BridgeAbstract {
else if (isset($param['s'])) { /* search mode */
$this->request = $param['s']; $page = 1; if (isset($param['pa'])) $page = (int)preg_replace("/[^0-9]/",'', $param['pa']);
$url_listing = $this->getURI().'results?search_query='.urlencode($this->request).'&page='.$page.'&filters=video&search_sort=video_date_uploaded';
- $html = file_get_html($url_listing) or $this->returnError("Could not request YouTube. Tried:\n - $url_listing", 500);
+ $html = $this->file_get_html($url_listing) or $this->returnError("Could not request YouTube. Tried:\n - $url_listing", 500);
$this->ytBridgeParseHtmlListing($html, 'div.yt-lockup', 'h3');
$this->request = 'Search: '.str_replace(' - YouTube', '', $html->find('title', 0)->plaintext);
}
diff --git a/bridges/ZatazBridge.php b/bridges/ZatazBridge.php
index b52c4dd9..baf28286 100644
--- a/bridges/ZatazBridge.php
+++ b/bridges/ZatazBridge.php
@@ -12,7 +12,7 @@ class ZatazBridge extends BridgeAbstract {
}
public function collectData(array $param) {
- $html = file_get_html($this->getURI()) or $this->returnError('Could not request ' . $this->getURI(), 404);
+ $html = $this->file_get_html($this->getURI()) or $this->returnError('Could not request ' . $this->getURI(), 404);
$recent_posts = $html->find('#recent-posts-3', 0)->find('ul', 0)->find('li');
foreach ($recent_posts as $article) {
@@ -24,7 +24,7 @@ class ZatazBridge extends BridgeAbstract {
}
private function getDetails($uri) {
- $html = file_get_html($uri) or exit;
+ $html = $this->file_get_html($uri) or exit;
$item = new \Item();
diff --git a/bridges/ZoneTelechargementBridge.php b/bridges/ZoneTelechargementBridge.php
index 0f5b2dd7..07c29b7b 100644
--- a/bridges/ZoneTelechargementBridge.php
+++ b/bridges/ZoneTelechargementBridge.php
@@ -31,7 +31,7 @@ class ZoneTelechargementBridge extends BridgeAbstract {
$category = '/'.$param['category'].'/';
$url = $this->getURI().$category.'rss.xml';
- $html = file_get_html($url) or $this->returnError('Could not request Zone Telechargement: '.$url, 500);
+ $html = $this->file_get_html($url) or $this->returnError('Could not request Zone Telechargement: '.$url, 500);
foreach($html->find('item') as $element) {
$item = new \Item();