6 from .common
import InfoExtractor
7 from .vimeo
import VimeoIE
8 from .youtube
import YoutubeIE
11 class UkColumnIE(InfoExtractor
):
14 _VALID_URL
= r
'(?i)https?://(?:www\.)?ukcolumn\.org(/index\.php)?/(?:video|ukcolumn-news)/(?P<id>[-a-z0-9]+)'
17 'url': 'https://www.ukcolumn.org/ukcolumn-news/uk-column-news-28th-april-2021',
21 'title': 'UK Column News - 28th April 2021',
22 'uploader_id': 'ukcolumn',
23 'uploader': 'UK Column',
25 'add_ie': [VimeoIE
.ie_key()],
26 'expected_warnings': ['Unable to download JSON metadata'],
28 'skip_download': 'Handled by Vimeo',
31 'url': 'https://www.ukcolumn.org/video/insight-eu-military-unification',
35 'title': 'Insight: EU Military Unification',
36 'uploader_id': 'ukcolumn',
37 'description': 'md5:29a207965271af89baa0bc191f5de576',
38 'uploader': 'UK Column',
39 'upload_date': '20170514',
41 'add_ie': [YoutubeIE
.ie_key()],
43 'skip_download': 'Handled by Youtube',
46 'url': 'https://www.ukcolumn.org/index.php/ukcolumn-news/uk-column-news-30th-april-2021',
47 'only_matching': True,
50 def _real_extract(self
, url
):
51 display_id
= self
._match
_id
(url
)
52 webpage
= self
._download
_webpage
(url
, display_id
)
54 oembed_url
= urljoin(url
, unescapeHTML(self
._search
_regex
(
55 r
'<iframe[^>]+src=(["\'])(?P
<url
>/media
/oembed
\?url
=.+?
)\
1',
56 webpage, 'OEmbed URL
', group='url
')))
57 oembed_webpage = self._download_webpage(
58 oembed_url, display_id, note='Downloading OEmbed page
')
60 ie, video_url = YoutubeIE, YoutubeIE._extract_url(oembed_webpage)
62 ie, video_url = VimeoIE, VimeoIE._extract_url(url, oembed_webpage)
64 raise ExtractorError('No embedded video found
')
67 '_type
': 'url_transparent
',
68 'title
': self._og_search_title(webpage),
70 'ie_key
': ie.ie_key(),