mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-01-17 14:18:35 +01:00
[DanbooruBridge] Fix broken URI
This fixes broken URIs in the output data caused by duplicate domain names caused by sites (descendant class Delbooru) providing absolute URIs instead of relative ones. References #552
This commit is contained in:
parent
1faa91ef0f
commit
f6f3a213ef
@ -31,11 +31,14 @@ class DanbooruBridge extends BridgeAbstract {
|
||||
}
|
||||
|
||||
protected function getItemFromElement($element){
|
||||
// Fix links
|
||||
defaultLinkTo($element, $this->getURI());
|
||||
|
||||
$item = array();
|
||||
$item['uri'] = $this->getURI() . $element->find('a', 0)->href;
|
||||
$item['uri'] = $element->find('a', 0)->href;
|
||||
$item['postid'] = (int)preg_replace("/[^0-9]/", '', $element->getAttribute(static::IDATTRIBUTE));
|
||||
$item['timestamp'] = time();
|
||||
$thumbnailUri = $this->getURI() . $element->find('img', 0)->src;
|
||||
$thumbnailUri = $element->find('img', 0)->src;
|
||||
$item['tags'] = $element->find('img', 0)->getAttribute('alt');
|
||||
$item['title'] = $this->getName() . ' | ' . $item['postid'];
|
||||
$item['content'] = '<a href="'
|
||||
|
Loading…
x
Reference in New Issue
Block a user