1
0
mirror of https://github.com/RSS-Bridge/rss-bridge.git synced 2025-08-12 11:34:09 +02:00

refactor: logger (#3678)

This commit is contained in:
Dag
2023-09-21 22:05:55 +02:00
committed by GitHub
parent 360f953be8
commit 7329b83cc0
30 changed files with 297 additions and 338 deletions

View File

@@ -77,12 +77,6 @@ class YoutubeBridge extends BridgeAbstract
private $channel_name = '';
// This took from repo BetterVideoRss of VerifiedJoseph.
const URI_REGEX = '/(https?:\/\/(?:www\.)?(?:[a-zA-Z0-9-.]{2,256}\.[a-z]{2,20})(\:[0-9]{2 ,4})?(?:\/[a-zA-Z0-9@:%_\+.,~#"\'!?&\/\/=\-*]+|\/)?)/ims'; //phpcs:ignore
private CacheInterface $cache;
public function __construct()
{
$this->cache = RssBridge::getCache();
}
private function collectDataInternal()
{
@@ -368,7 +362,7 @@ class YoutubeBridge extends BridgeAbstract
$scriptRegex = '/var ytInitialData = (.*?);<\/script>/';
$result = preg_match($scriptRegex, $html, $matches);
if (! $result) {
Logger::debug('Could not find ytInitialData');
$this->logger->debug('Could not find ytInitialData');
return null;
}
return json_decode($matches[1]);