mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2024-11-29 14:48:52 +03:00
[ScribdBridge] Fix bridge (#1478)
This commit is contained in:
parent
8e2b65556f
commit
1ae7cf6530
1 changed files with 4 additions and 7 deletions
|
@ -9,8 +9,8 @@ class ScribdBridge extends BridgeAbstract {
|
||||||
'name' => 'Profile URL',
|
'name' => 'Profile URL',
|
||||||
'type' => 'text',
|
'type' => 'text',
|
||||||
'required' => true,
|
'required' => true,
|
||||||
'title' => 'Profile URL. Example: 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/217860653/Legal-Momentum'
|
'exampleValue' => 'https://www.scribd.com/user/'
|
||||||
),
|
),
|
||||||
));
|
));
|
||||||
|
|
||||||
|
@ -20,19 +20,16 @@ class ScribdBridge extends BridgeAbstract {
|
||||||
private $feedName = '';
|
private $feedName = '';
|
||||||
|
|
||||||
public function collectData() {
|
public function collectData() {
|
||||||
|
|
||||||
$html = getSimpleHTMLDOM($this->getURI());
|
$html = getSimpleHTMLDOM($this->getURI());
|
||||||
|
|
||||||
$header = $html->find('div.header', 0);
|
$this->feedName = $html->find('div.header', 0)->plaintext;
|
||||||
$this->feedName = $header->find('a', 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 = array();
|
||||||
|
|
||||||
$item['title'] = $li->find('div.under_title', 0)->plaintext;
|
$item['title'] = $li->find('div.under_title', 0)->plaintext;
|
||||||
$item['uri'] = $li->find('a', 0)->href;
|
$item['uri'] = $li->find('a', 0)->href;
|
||||||
$item['author'] = $li->find('span.uploader', 0)->plaintext;
|
$item['author'] = $li->find('span.uploader', 0)->plaintext;
|
||||||
//$item['timestamp'] =
|
|
||||||
$item['uid'] = $li->find('a', 0)->href;
|
$item['uid'] = $li->find('a', 0)->href;
|
||||||
|
|
||||||
$pageHtml = getSimpleHTMLDOMCached($item['uri'], 3600);
|
$pageHtml = getSimpleHTMLDOMCached($item['uri'], 3600);
|
||||||
|
|
Loading…
Reference in a new issue