Skip to content

Commit

Permalink
Add Podbean URL formats (#109)
Browse files Browse the repository at this point in the history
Signed-off-by: Shaun <[email protected]>
  • Loading branch information
simshaun authored May 24, 2024
1 parent efdd70f commit b29e872
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Embera/Provider/Podbean.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class Podbean extends ProviderAdapter implements ProviderInterface
/** inline {@inheritdoc} */
public function validateUrl(Url $url)
{
return (bool) (preg_match('~podbean\.com/e/([^/]+)$~i', (string) $url));
return (bool) (preg_match('~podbean\.com/(?:e|eas|media/share)/([^/]+)$~i', (string) $url));
}

/** inline {@inheritdoc} */
Expand Down
2 changes: 2 additions & 0 deletions tests/Embera/Provider/PodbeanTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ final class PodbeanTest extends ProviderTester
'valid_urls' => [
'https://podcast.podbean.com/e/jen-and-vernon-chat-podcast-resolutions-twitter-advice-and-predictions-for-2019/',
'https://pretaporter.podbean.com/e/pret-a-porter-dos-bastidores-a-passarela-da-modalisboa-collective/',
'https://www.podbean.com/eas/pb-ab123-1234567',
'https://www.podbean.com/media/share/pb-abcde-1234567',
],
'invalid_urls' => [
'https://podcast.podbean.com/',
Expand Down

0 comments on commit b29e872

Please sign in to comment.