mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-04-03 16:19:45 +00:00
[KemonoBridge] attempt to fix malformed tag responses (#4209)
This commit is contained in:
parent
129b8a3a5a
commit
2e6e246759
@ -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 New Issue
Block a user