mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2024-11-22 01:25:28 +03:00
[RutubeBridge] Fix regex for retreiving reduxState (#2955)
Before this commit regex captured window.reduxState value until first semicolon. This is incorrect since it produces invalid json, if semicolon is also somethere in the middle of stringified json. After this commit regex will capture window.reduxState value until last semicolon.
This commit is contained in:
parent
3984427f44
commit
205f0a7239
1 changed files with 1 additions and 1 deletions
|
@ -55,7 +55,7 @@ class RutubeBridge extends BridgeAbstract
|
|||
|
||||
private function getJSONData($html)
|
||||
{
|
||||
$jsonDataRegex = '/window.reduxState = (.*?);/';
|
||||
$jsonDataRegex = '/window.reduxState = (.*);/';
|
||||
preg_match($jsonDataRegex, $html, $matches) or returnServerError('Could not find reduxState');
|
||||
return json_decode(str_replace('\x', '\\\x', $matches[1]));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue