Compare commits

..

No commits in common. "e81c2c5a180e6c207c17310316ae6050c4537294" and "1e99ad70f0d72e6c0c66ce434c3de7d8578d5ca7" have entirely different histories.

View File

@ -1,13 +1,5 @@
from .common import InfoExtractor
from .youtube import YoutubeIE
from ..utils import (
ExtractorError,
int_or_none,
qualities,
str_or_none,
url_or_none,
)
from ..utils.traversal import traverse_obj
from ..utils import ExtractorError, dict_get, qualities, traverse_obj
class BoostyIE(InfoExtractor):
@ -28,7 +20,7 @@ class BoostyIE(InfoExtractor):
'ext': 'mp4',
'duration': 105,
'view_count': int,
'thumbnail': r're:^https://i\.mycdn\.me/videoPreview\?',
'thumbnail': r're:^https://i.mycdn.me/videoPreview\?',
},
}, {
# multiple ok_video
@ -52,7 +44,7 @@ class BoostyIE(InfoExtractor):
'ext': 'mp4',
'duration': 31204,
'view_count': int,
'thumbnail': r're:^https://i\.mycdn\.me/videoPreview\?',
'thumbnail': r're:^https://i.mycdn.me/videoPreview\?',
},
}, {
'info_dict': {
@ -61,7 +53,7 @@ class BoostyIE(InfoExtractor):
'ext': 'mp4',
'duration': 25704,
'view_count': int,
'thumbnail': r're:^https://i\.mycdn\.me/videoPreview\?',
'thumbnail': r're:^https://i.mycdn.me/videoPreview\?',
},
}, {
'info_dict': {
@ -70,7 +62,7 @@ class BoostyIE(InfoExtractor):
'ext': 'mp4',
'duration': 31867,
'view_count': int,
'thumbnail': r're:^https://i\.mycdn\.me/videoPreview\?',
'thumbnail': r're:^https://i.mycdn.me/videoPreview\?',
},
}],
}, {
@ -89,7 +81,7 @@ class BoostyIE(InfoExtractor):
'ext': 'mp4',
'duration': 816,
'view_count': int,
'thumbnail': r're:^https://i\.ytimg\.com/',
'thumbnail': r're:^https://i.ytimg.com/',
# youtube fields
'age_limit': 0,
'availability': 'public',
@ -97,7 +89,7 @@ class BoostyIE(InfoExtractor):
'channel_follower_count': int,
'channel_id': 'UCCzVNbWZfYpBfyofCCUD_0w',
'channel_is_verified': bool,
'channel_url': r're:^https://www\.youtube\.com/',
'channel_url': r're:^https://www.youtube.com/',
'comment_count': int,
'description': str,
'heatmap': 'count:100',
@ -105,16 +97,17 @@ class BoostyIE(InfoExtractor):
'playable_in_embed': bool,
'uploader': str,
'uploader_id': str,
'uploader_url': r're:^https://www\.youtube\.com/',
'uploader_url': r're:^https://www.youtube.com/',
},
}]
def _real_extract(self, url):
user, post_id = self._match_valid_url(url).group('user', 'post_id')
post = self._download_json(
f'https://api.boosty.to/v1/blog/{user}/post/{post_id}', post_id,
note='Downloading post data', errnote='Unable to download post data')
f'https://api.boosty.to/v1/blog/{user}/post/{post_id}',
post_id,
note='Downloading post data',
errnote='Unable to download post data')
post_title = self._extract_title(post, post_id, url)
entries = self._extract_entries(post, post_id, post_title)
if not entries: