mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-03-14 20:21:14 +03:00
[InternetArchiveBridge] Fix collection links (#1551)
This commit is contained in:
parent
3aafd44079
commit
f904353fd2
1 changed files with 2 additions and 10 deletions
|
@ -42,7 +42,6 @@ class InternetArchiveBridge extends BridgeAbstract {
|
|||
$html = defaultLinkTo($html, $this->getURI());
|
||||
|
||||
if ($this->getInput('content') !== 'posts') {
|
||||
|
||||
$detailsDivNumber = 0;
|
||||
|
||||
foreach ($html->find('div.results > div[data-id]') as $index => $result) {
|
||||
|
@ -54,7 +53,6 @@ class InternetArchiveBridge extends BridgeAbstract {
|
|||
|
||||
switch($result->class) {
|
||||
case 'item-ia':
|
||||
|
||||
switch($this->getInput('content')) {
|
||||
case 'reviews':
|
||||
$item = $this->processReview($result);
|
||||
|
@ -104,7 +102,6 @@ class InternetArchiveBridge extends BridgeAbstract {
|
|||
public function getName() {
|
||||
|
||||
if (!is_null($this->getInput('username')) && !is_null($this->getInput('content'))) {
|
||||
|
||||
$contentValues = array_flip(self::PARAMETERS['Account']['content']['values']);
|
||||
|
||||
return $contentValues[$this->getInput('content')] . ' - '
|
||||
|
@ -124,11 +121,10 @@ class InternetArchiveBridge extends BridgeAbstract {
|
|||
}
|
||||
|
||||
private function processUpload($result) {
|
||||
|
||||
$item = array();
|
||||
|
||||
$collection = $result->find('a.stealth', 0);
|
||||
$collectionLink = self::URI . $collection->href;
|
||||
$collectionLink = $collection->href;
|
||||
$collectionTitle = $collection->find('div.item-parent-ttl', 0)->plaintext;
|
||||
|
||||
$item['title'] = trim($result->find('div.ttl', 0)->innertext);
|
||||
|
@ -150,7 +146,6 @@ EOD;
|
|||
}
|
||||
|
||||
private function processReview($result) {
|
||||
|
||||
$item = array();
|
||||
|
||||
$item['title'] = trim($result->find('div.ttl', 0)->innertext);
|
||||
|
@ -172,7 +167,6 @@ EOD;
|
|||
}
|
||||
|
||||
private function processWebArchives($result) {
|
||||
|
||||
$item = array();
|
||||
|
||||
$item['title'] = trim($result->find('div.ttl', 0)->plaintext);
|
||||
|
@ -189,7 +183,6 @@ EOD;
|
|||
}
|
||||
|
||||
private function processCollection($result) {
|
||||
|
||||
$item = array();
|
||||
|
||||
$title = trim($result->find('div.collection-title.C.C2', 0)->children(0)->plaintext);
|
||||
|
@ -209,7 +202,6 @@ EOD;
|
|||
}
|
||||
|
||||
private function processHiddenDetails($html, $detailsDivNumber, $item) {
|
||||
|
||||
$description = '';
|
||||
|
||||
if ($html->find('div.details-ia.hidden-tiles', $detailsDivNumber)) {
|
||||
|
@ -237,7 +229,6 @@ EOD;
|
|||
}
|
||||
|
||||
private function processPosts($html) {
|
||||
|
||||
$items = array();
|
||||
|
||||
foreach ($html->find('table.forumTable > tr') as $index => $tr) {
|
||||
|
@ -288,6 +279,7 @@ EOD;
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return $items;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue