1 from .common
import InfoExtractor
4 class FilmwebIE(InfoExtractor
):
5 _VALID_URL
= r
'https?://(?:www\.)?filmweb\.no/(?P<type>trailere|filmnytt)/article(?P<id>\d+)\.ece'
7 'url': 'http://www.filmweb.no/trailere/article1264921.ece',
8 'md5': 'e353f47df98e557d67edaceda9dece89',
12 'title': 'Det som en gang var',
13 'upload_date': '20160316',
14 'timestamp': 1458140101,
15 'uploader_id': '12639966',
16 'uploader': 'Live Roaldset',
20 def _real_extract(self
, url
):
21 article_type
, article_id
= self
._match
_valid
_url
(url
).groups()
22 if article_type
== 'filmnytt':
23 webpage
= self
._download
_webpage
(url
, article_id
)
24 article_id
= self
._search
_regex
(r
'data-videoid="(\d+)"', webpage
, 'article id')
25 embed_code
= self
._download
_json
(
26 'https://www.filmweb.no/template_v2/ajax/json_trailerEmbed.jsp',
28 'articleId': article_id
,
30 iframe_url
= self
._proto
_relative
_url
(self
._search
_regex
(
31 r
'<iframe[^>]+src="([^"]+)', embed_code
, 'iframe url'))
34 '_type': 'url_transparent',
37 'ie_key': 'TwentyThreeVideo',