bridges: use BridgeAbstract::getSimpleHTMLDOM

instead of BridgeAbstract::file_get_html

Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
This commit is contained in:
Pierre Mazière 2016-07-08 19:06:35 +02:00
parent f43bbda83e
commit 3c0d13c1bb
121 changed files with 1212 additions and 396 deletions

View file

@ -109,9 +109,9 @@ class FacebookBridge extends BridgeAbstract{
if (is_null($html)) {
if (isset($param['u'])) {
if (!strpos($param['u'], "/")) {
$html = $this->file_get_html('https://www.facebook.com/'.urlencode($param['u']).'?_fb_noscript=1') or $this->returnServerError('No results for this query.');
$html = $this->getSimpleHTMLDOM('https://www.facebook.com/'.urlencode($param['u']).'?_fb_noscript=1') or $this->returnServerError('No results for this query.');
} else {
$html = $this->file_get_html('https://www.facebook.com/pages/'.$param['u'].'?_fb_noscript=1') or $this->returnServerError('No results for this query.');
$html = $this->getSimpleHTMLDOM('https://www.facebook.com/pages/'.$param['u'].'?_fb_noscript=1') or $this->returnServerError('No results for this query.');
}
} else {
$this->returnClientError('You must specify a Facebook username.');
@ -155,7 +155,7 @@ class FacebookBridge extends BridgeAbstract{
$this->name = $author;
foreach($element->children() as $post) {
$item = new \Item();
if (count($post->find('abbr')) > 0) {