mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-07-19 18:25:37 +02:00
fix: various fixes (#3745)
This commit is contained in:
parent
382648fc22
commit
44fb2c98bc
3 changed files with 16 additions and 11 deletions
|
@ -47,8 +47,8 @@ class CubariBridge extends BridgeAbstract
|
|||
*/
|
||||
public function collectData()
|
||||
{
|
||||
$jsonSite = getContents($this->getInput('gist'));
|
||||
$jsonFile = json_decode($jsonSite, true);
|
||||
$json = getContents($this->getInput('gist'));
|
||||
$jsonFile = json_decode($json, true);
|
||||
|
||||
$this->mangaTitle = $jsonFile['title'];
|
||||
|
||||
|
@ -66,12 +66,14 @@ class CubariBridge extends BridgeAbstract
|
|||
{
|
||||
$url = $this->getInput('gist');
|
||||
|
||||
preg_match('/\/([a-z]*)\.githubusercontent.com(.*)/', $url, $matches);
|
||||
|
||||
// raw or gist is first match.
|
||||
$unencoded = $matches[1] . $matches[2];
|
||||
|
||||
return base64_encode($unencoded);
|
||||
if (preg_match('/\/([a-z]*)\.githubusercontent.com(.*)/', $url, $matches)) {
|
||||
// raw or gist is first match.
|
||||
$unencoded = $matches[1] . $matches[2];
|
||||
return base64_encode($unencoded);
|
||||
} else {
|
||||
// todo: fix this
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
||||
private function getSanitizedHash($string)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue