mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-03-14 19:42:46 +00:00
[KemonoBridge] attempt to fix malformed tag responses (#4209)
This commit is contained in:
parent
129b8a3a5a
commit
2e6e246759
1 changed files with 4 additions and 3 deletions
|
@ -55,9 +55,10 @@ class KemonoBridge extends BridgeAbstract
|
|||
if (is_array($tags)) {
|
||||
$item['categories'] = $tags;
|
||||
} else {
|
||||
$tags = preg_replace('/^{"?/', '["', $tags);
|
||||
$tags = preg_replace('/"?}$/', '"]', $tags);
|
||||
$item['categories'] = Json::decode($tags);
|
||||
$tags = preg_replace('/^{/', '', $tags);
|
||||
$tags = preg_replace('/}$/', '', $tags);
|
||||
$tags = preg_replace('/"/', '', $tags);
|
||||
$item['categories'] = explode(',', $tags);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue