[FacebookBridge] Permalink fix (#1838)

Also removing timestamp which does not work
This commit is contained in:
Joshua Coales 2020-11-06 13:43:10 +00:00 committed by GitHub
parent 0655b3cb39
commit efe32aad22
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 11 deletions

View File

@ -203,7 +203,6 @@ class FacebookBridge extends BridgeAbstract {
$item['title'] = $this->extractGroupPostTitle($post);
$item['author'] = $this->extractGroupPostAuthor($post);
$item['content'] = $this->extractGroupPostContent($post);
$item['timestamp'] = $this->extractGroupPostTimestamp($post);
$item['enclosures'] = $this->extractGroupPostEnclosures($post);
$this->items[] = $item;
@ -282,7 +281,8 @@ class FacebookBridge extends BridgeAbstract {
// Find the one that is a permalink
if(strpos($anchor->href, 'permalink') !== false) {
return $anchor->href;
$arr = explode('?', $anchor->href, 2);
return $arr[0];
}
}
@ -304,15 +304,6 @@ class FacebookBridge extends BridgeAbstract {
}
private function extractGroupPostTimestamp($post) {
$element = $post->find('abbr', 0)
or returnServerError('Unable to find timestamp!');
return $element->plaintext;
}
private function extractGroupPostAuthor($post) {
$element = $post->find('h3 a', 0)