mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-08-26 09:34:46 +02:00
bridges: add context to detectParameters (#3607)
* bridges: add context to detectParameters Some bridges did not return the context parameter but they used it in the parameters * bridges: add context to detectParameters Fix test for InstagramBridge
This commit is contained in:
@@ -267,6 +267,7 @@ HTML,
|
||||
$regex = '/^http(s|):\/\/((www\.|)(instagram.com)\/([a-zA-Z0-9_\.]{1,30})\/(reels\/|tagged\/|)
|
||||
|(www\.|)(imgsed.com)\/(stories\/|tagged\/|)([a-zA-Z0-9_\.]{1,30})\/)/';
|
||||
if (preg_match($regex, $url, $matches) > 0) {
|
||||
$params['context'] = 'Username';
|
||||
// Extract detected domain using the regex
|
||||
$domain = $matches[8] ?? $matches[4];
|
||||
if ($domain == 'imgsed.com') {
|
||||
|
Reference in New Issue
Block a user