+ def _real_extract(self, url):
+ page_id = self._match_id(url)
+ webpage = self._download_webpage(url, page_id)
+ video_id = self._search_regex([
+ r'<iframe[^>]+src="[^"]*?object_id=(\d+)',
+ r"object_id\s*:\s*'(\d+)'",
+ r'data-video-id="(\d+)"'], webpage, 'video id', default=page_id)
+ return {
+ '_type': 'url_transparent',
+ 'url': 'tvp:' + video_id,
+ 'description': self._og_search_description(webpage, default=None),
+ 'thumbnail': self._og_search_thumbnail(webpage),
+ 'ie_key': 'TVPEmbed',
+ }
+
+
+class TVPEmbedIE(InfoExtractor):
+ IE_NAME = 'tvp:embed'
+ IE_DESC = 'Telewizja Polska'
+ _VALID_URL = r'(?:tvp:|https?://[^/]+\.tvp\.(?:pl|info)/sess/tvplayer\.php\?.*?object_id=)(?P<id>\d+)'
+
+ _TESTS = [{
+ 'url': 'http://www.tvp.pl/sess/tvplayer.php?object_id=22670268',
+ 'md5': '8c9cd59d16edabf39331f93bf8a766c7',
+ 'info_dict': {
+ 'id': '22670268',
+ 'ext': 'mp4',
+ 'title': 'Panorama, 07.12.2015, 15:40',
+ },
+ }, {
+ 'url': 'tvp:22670268',
+ 'only_matching': True,
+ }]
+