From 1ae7cf6530282db74d08db1178b158b662a5d628 Mon Sep 17 00:00:00 2001 From: Joseph Date: Thu, 24 Mar 2022 20:32:16 +0000 Subject: [PATCH] [ScribdBridge] Fix bridge (#1478) --- bridges/ScribdBridge.php | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/bridges/ScribdBridge.php b/bridges/ScribdBridge.php index 22a45ba5..65fe6040 100644 --- a/bridges/ScribdBridge.php +++ b/bridges/ScribdBridge.php @@ -9,8 +9,8 @@ class ScribdBridge extends BridgeAbstract { 'name' => 'Profile URL', 'type' => 'text', 'required' => true, - 'title' => 'Profile URL. Example: https://www.scribd.com/user/217860653/Legal-Momentum', - 'exampleValue' => 'https://www.scribd.com/user/217860653/Legal-Momentum' + 'title' => 'Profile URL. Example: https://www.scribd.com/user/164147088/Ars-Technica', + 'exampleValue' => 'https://www.scribd.com/user/' ), )); @@ -20,19 +20,16 @@ class ScribdBridge extends BridgeAbstract { private $feedName = ''; public function collectData() { - $html = getSimpleHTMLDOM($this->getURI()); - $header = $html->find('div.header', 0); - $this->feedName = $header->find('a', 0)->plaintext; + $this->feedName = $html->find('div.header', 0)->plaintext; - foreach($html->find('div.content ul li') as $index => $li) { + foreach($html->find('ul.document_cells > li') as $index => $li) { $item = array(); $item['title'] = $li->find('div.under_title', 0)->plaintext; $item['uri'] = $li->find('a', 0)->href; $item['author'] = $li->find('span.uploader', 0)->plaintext; - //$item['timestamp'] = $item['uid'] = $li->find('a', 0)->href; $pageHtml = getSimpleHTMLDOMCached($item['uri'], 3600);