Skip to content

Commit

Permalink
[extractor/youtube:stories] Remove (#7459)
Browse files Browse the repository at this point in the history
  • Loading branch information
coletdjnz committed Jul 6, 2023
1 parent 4929643 commit 90db9a3
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 43 deletions.
1 change: 0 additions & 1 deletion yt_dlp/extractor/_extractors.py
Expand Up @@ -15,7 +15,6 @@
YoutubeSearchURLIE,
YoutubeMusicSearchURLIE,
YoutubeSubscriptionsIE,
YoutubeStoriesIE,
YoutubeTruncatedIDIE,
YoutubeTruncatedURLIE,
YoutubeYtBeIE,
Expand Down
43 changes: 1 addition & 42 deletions yt_dlp/extractor/youtube.py
Expand Up @@ -2499,29 +2499,6 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
'uploader_id': '@abaointokyo',
},
'params': {'skip_download': True}
}, {
# Story. Requires specific player params to work.
'url': 'https://www.youtube.com/watch?v=vv8qTUWmulI',
'info_dict': {
'id': 'vv8qTUWmulI',
'ext': 'mp4',
'availability': 'unlisted',
'view_count': int,
'channel_id': 'UCzIZ8HrzDgc-pNQDUG6avBA',
'upload_date': '20220526',
'categories': ['Education'],
'title': 'Story',
'channel': 'IT\'S HISTORY',
'description': '',
'duration': 12,
'playable_in_embed': True,
'age_limit': 0,
'live_status': 'not_live',
'tags': [],
'thumbnail': 'https://i.ytimg.com/vi_webp/vv8qTUWmulI/maxresdefault.webp',
'channel_url': 'https://www.youtube.com/channel/UCzIZ8HrzDgc-pNQDUG6avBA',
},
'skip': 'stories get removed after some period of time',
}, {
'url': 'https://www.youtube.com/watch?v=tjjjtzRLHvA',
'info_dict': {
Expand Down Expand Up @@ -3620,7 +3597,7 @@ def _extract_player_response(self, client, video_id, master_ytcfg, player_ytcfg,
yt_query = {
'videoId': video_id,
}
if smuggled_data.get('is_story') or _split_innertube_client(client)[0] == 'android':
if _split_innertube_client(client)[0] == 'android':
yt_query['params'] = self._PLAYER_PARAMS

yt_query.update(self._generate_player_context(sts))
Expand Down Expand Up @@ -4033,8 +4010,6 @@ def _download_player_responses(self, url, smuggled_data, video_id, webpage_url):
webpage = None
if 'webpage' not in self._configuration_arg('player_skip'):
query = {'bpctr': '9999999999', 'has_verified': '1'}
if smuggled_data.get('is_story'): # XXX: Deprecated
query['pp'] = self._PLAYER_PARAMS
webpage = self._download_webpage(
webpage_url, video_id, fatal=False, query=query)

Expand Down Expand Up @@ -7145,22 +7120,6 @@ class YoutubeHistoryIE(YoutubeFeedsInfoExtractor):
}]


class YoutubeStoriesIE(InfoExtractor):
IE_DESC = 'YouTube channel stories; "ytstories:" prefix'
IE_NAME = 'youtube:stories'
_VALID_URL = r'ytstories:UC(?P<id>[A-Za-z0-9_-]{21}[AQgw])$'
_TESTS = [{
'url': 'ytstories:UCwFCb4jeqaKWnciAYM-ZVHg',
'only_matching': True,
}]

def _real_extract(self, url):
playlist_id = f'RLTD{self._match_id(url)}'
return self.url_result(
smuggle_url(f'https://www.youtube.com/playlist?list={playlist_id}&playnext=1', {'is_story': True}),
ie=YoutubeTabIE, video_id=playlist_id)


class YoutubeShortsAudioPivotIE(InfoExtractor):
IE_DESC = 'YouTube Shorts audio pivot (Shorts using audio of a given video)'
IE_NAME = 'youtube:shorts:pivot:audio'
Expand Down

0 comments on commit 90db9a3

Please sign in to comment.