bridges: change 'tags' to 'categories' (#1942)

This commit is contained in:
dawidsowa 2022-03-24 23:04:12 +01:00 committed by GitHub
parent 1f2b295bf3
commit 78a5136cc9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 6 deletions

View File

@ -44,14 +44,14 @@ class DanbooruBridge extends BridgeAbstract {
$item['postid'] = (int)preg_replace('/[^0-9]/', '', $element->getAttribute(static::IDATTRIBUTE));
$item['timestamp'] = time();
$thumbnailUri = $element->find('img', 0)->src;
$item['tags'] = $this->getTags($element);
$item['categories'] = array_filter(explode(' ', $this->getTags($element)));
$item['title'] = $this->getName() . ' | ' . $item['postid'];
$item['content'] = '<a href="'
. $item['uri']
. '"><img src="'
. $thumbnailUri
. '" /></a><br>Tags: '
. $item['tags'];
. $this->getTags($element);
return $item;
}

View File

@ -16,14 +16,14 @@ class Rule34pahealBridge extends Shimmie2Bridge {
$item['id'] = (int)preg_replace('/[^0-9]/', '', $element->getAttribute(static::IDATTRIBUTE));
$item['timestamp'] = time();
$thumbnailUri = $element->find('a', 1)->href;
$item['tags'] = $element->getAttribute('data-tags');
$item['categories'] = explode(' ', $element->getAttribute('data-tags'));
$item['title'] = $this->getName() . ' | ' . $item['id'];
$item['content'] = '<a href="'
. $item['uri']
. '"><img src="'
. $thumbnailUri
. '" /></a><br>Tags: '
. $item['tags'];
. $element->getAttribute('data-tags');
return $item;
}
}

View File

@ -24,14 +24,14 @@ class Shimmie2Bridge extends DanbooruBridge {
$item['id'] = (int)preg_replace('/[^0-9]/', '', $element->getAttribute(static::IDATTRIBUTE));
$item['timestamp'] = time();
$thumbnailUri = $this->getURI() . $element->find('img', 0)->src;
$item['tags'] = $element->getAttribute('data-tags');
$item['categories'] = explode(' ', $element->getAttribute('data-tags'));
$item['title'] = $this->getName() . ' | ' . $item['id'];
$item['content'] = '<a href="'
. $item['uri']
. '"><img src="'
. $thumbnailUri
. '" /></a><br>Tags: '
. $item['tags'];
. $element->getAttribute('data-tags');
return $item;
}