Skip to content

Commit

Permalink
Apply suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
mimvahedi committed Nov 27, 2023
1 parent 25afca6 commit 9a039c1
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions youtube_dl/extractor/telewebion.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@

from .common import InfoExtractor

from ..utils import (
float_or_none,
int_or_none,
url_or_none,
)


class TelewebionIE(InfoExtractor):
_VALID_URL = r'https?://(?:www\.)?telewebion\.com/(episode|clip)/(?P<id>[a-zA-Z0-9]+)'
Expand Down Expand Up @@ -36,15 +42,11 @@ def _real_extract(self, url):
formats = self._extract_m3u8_formats(
m3u8_url, video_id, ext='mp4', m3u8_id='hls')

thumbnails = [{
'url': episode_image,
}]

return {
'id': video_id,
'title': episode_details.get('title'),
'title': episode_details['title'],
'formats': formats,
'thumbnails': thumbnails,
'thumbnail': url_or_none(episode_image),
'view_count': int_or_none(episode_details.get('view_count')),
'duration': float_or_none(episode_details.get('duration')),
}

0 comments on commit 9a039c1

Please sign in to comment.