[extractors] Use new framework for existing embeds (#4307)
`Brightcove` is difficult to migrate because it's subclasses may depend on the signature of the current functions. So it is left as-is for now Note: Tests have not been migrated
This commit is contained in:
parent
1e8fe57e5c
commit
bfd973ece3
138 changed files with 500 additions and 1910 deletions
|
|
@ -1,5 +1,3 @@
|
|||
import re
|
||||
|
||||
from .common import InfoExtractor
|
||||
from ..utils import js_to_json
|
||||
|
||||
|
|
@ -8,6 +6,7 @@ class MegaphoneIE(InfoExtractor):
|
|||
IE_NAME = 'megaphone.fm'
|
||||
IE_DESC = 'megaphone.fm embedded players'
|
||||
_VALID_URL = r'https://player\.megaphone\.fm/(?P<id>[A-Z0-9]+)'
|
||||
_EMBED_REGEX = [rf'<iframe[^>]*?\ssrc=["\'](?P<url>{_VALID_URL})']
|
||||
_TEST = {
|
||||
'url': 'https://player.megaphone.fm/GLT9749789991?"',
|
||||
'md5': '4816a0de523eb3e972dc0dda2c191f96',
|
||||
|
|
@ -45,8 +44,3 @@ class MegaphoneIE(InfoExtractor):
|
|||
'duration': episode_data['duration'],
|
||||
'formats': formats,
|
||||
}
|
||||
|
||||
@classmethod
|
||||
def _extract_urls(cls, webpage):
|
||||
return [m[0] for m in re.findall(
|
||||
r'<iframe[^>]*?\ssrc=["\'](%s)' % cls._VALID_URL, webpage)]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue