1 from .common
import InfoExtractor
2 from ..utils
import ExtractorError
, traverse_obj
5 class IsraelNationalNewsIE(InfoExtractor
):
6 _VALID_URL
= r
'https?://(?:www\.)?israelnationalnews\.com/news/(?P<id>\d+)'
8 'url': 'https://www.israelnationalnews.com/news/354520',
15 'title': 'Even CNN Host Is Shocked by How Bad Biden\'s Approval Ratings Have Gotten | DM CLIPS | Rubin Report',
17 'description': 'md5:b7325a3d00c7596337dc3ae37e32d35c',
18 'channel': 'The Rubin Report',
19 'channel_follower_count': int,
21 'categories': ['News & Politics'],
23 'uploader_url': 'http://www.youtube.com/user/RubinReport',
24 'uploader_id': 'RubinReport',
25 'availability': 'public',
28 'thumbnail': 'https://i.ytimg.com/vi_webp/jA84wQhVvg8/maxresdefault.webp',
29 'live_status': 'not_live',
30 'playable_in_embed': True,
33 'channel_id': 'UCJdKr0Bgd_5saZYqLCa9mng',
34 'channel_url': 'https://www.youtube.com/channel/UCJdKr0Bgd_5saZYqLCa9mng',
35 'upload_date': '20220606',
36 'uploader': 'The Rubin Report',
41 def _real_extract(self
, url
):
42 news_article_id
= self
._match
_id
(url
)
43 article_json
= self
._download
_json
(
44 f
'https://www.israelnationalnews.com/Generic/NewAPI/Item?type=0&Item={news_article_id}', news_article_id
)
46 urls
= traverse_obj(article_json
, ('Content2', ..., 'content', ..., 'attrs', 'src'))
48 raise ExtractorError('This article does not have any videos', expected
=True)
50 return self
.playlist_from_matches(urls
, news_article_id
, ie
='Youtube')