mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-24 08:11:31 +01:00
Compare commits
No commits in common. "50d47c514739fea1fcabac44a09a92094d597d0a" and "180574cc6c4f24407dcbe8a53ebb541657f99709" have entirely different histories.
50d47c5147
...
180574cc6c
|
@ -174,8 +174,9 @@ class FloatplaneIE(InfoExtractor):
|
||||||
})
|
})
|
||||||
|
|
||||||
uploader_url = format_field(traverse_obj(
|
uploader_url = format_field(traverse_obj(
|
||||||
post_data, 'creator'), 'urlname', 'https://www.floatplane.com/channel/%s/home', default=None)
|
post_data, ('creator', 'urlname')), template='https://www.floatplane.com/channel/%s/home', default=None)
|
||||||
channel_url = urljoin(f'{uploader_url}/', traverse_obj(post_data, ('channel', 'urlname')))
|
channel_url = format_field(traverse_obj(
|
||||||
|
post_data, ('channel', 'urlname')), template=f'{uploader_url}/%s', default=None)
|
||||||
|
|
||||||
post_info = {
|
post_info = {
|
||||||
'id': post_id,
|
'id': post_id,
|
||||||
|
@ -206,7 +207,7 @@ class FloatplaneIE(InfoExtractor):
|
||||||
|
|
||||||
|
|
||||||
class FloatplaneChannelIE(InfoExtractor):
|
class FloatplaneChannelIE(InfoExtractor):
|
||||||
_VALID_URL = r'https?://(?:(?:www|beta)\.)?floatplane\.com/channel/(?P<id>[\w-]+)/home(?:/(?P<channel>[\w-]+))?'
|
_VALID_URL = r'https?://(?:(?:www|beta)\.)?floatplane\.com/channel/(?P<id>[\w_]+)/home(?:/(?P<channel>[\w_]+))?'
|
||||||
_PAGE_SIZE = 20
|
_PAGE_SIZE = 20
|
||||||
_TESTS = [{
|
_TESTS = [{
|
||||||
'url': 'https://www.floatplane.com/channel/linustechtips/home/ltxexpo',
|
'url': 'https://www.floatplane.com/channel/linustechtips/home/ltxexpo',
|
||||||
|
@ -244,7 +245,7 @@ class FloatplaneChannelIE(InfoExtractor):
|
||||||
query['channel'] = channel_id
|
query['channel'] = channel_id
|
||||||
page_data = self._download_json(
|
page_data = self._download_json(
|
||||||
'https://www.floatplane.com/api/v3/content/creator', display_id,
|
'https://www.floatplane.com/api/v3/content/creator', display_id,
|
||||||
query=query, note=f'Downloading page {page + 1}')
|
query=query, note=f'Downloading page {page+1}')
|
||||||
for post in page_data or []:
|
for post in page_data or []:
|
||||||
yield self.url_result(
|
yield self.url_result(
|
||||||
f'https://www.floatplane.com/post/{post["id"]}',
|
f'https://www.floatplane.com/post/{post["id"]}',
|
||||||
|
@ -259,7 +260,7 @@ class FloatplaneChannelIE(InfoExtractor):
|
||||||
'https://www.floatplane.com/api/v3/creator/named', display_id, query={'creatorURL[0]': creator})[0]
|
'https://www.floatplane.com/api/v3/creator/named', display_id, query={'creatorURL[0]': creator})[0]
|
||||||
|
|
||||||
channel_data = traverse_obj(
|
channel_data = traverse_obj(
|
||||||
creator_data, ('channels', lambda _, v: v['urlname'] == channel, {dict}), get_all=False) or {}
|
creator_data, ('channels', lambda _, x: x['urlname'] == channel, {dict}), get_all=False) or {}
|
||||||
|
|
||||||
return self.playlist_result(OnDemandPagedList(functools.partial(
|
return self.playlist_result(OnDemandPagedList(functools.partial(
|
||||||
self._fetch_page, display_id, creator_data['id'], channel_data.get('id')), self._PAGE_SIZE), display_id,
|
self._fetch_page, display_id, creator_data['id'], channel_data.get('id')), self._PAGE_SIZE), display_id,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user