mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-12-02 19:27:33 +01:00
parent
a250b24733
commit
11de6fec9c
@ -2,21 +2,21 @@
|
|||||||
|
|
||||||
from .common import InfoExtractor
|
from .common import InfoExtractor
|
||||||
from .vimeo import VimeoIE
|
from .vimeo import VimeoIE
|
||||||
|
|
||||||
from ..compat import compat_urllib_parse_unquote
|
from ..compat import compat_urllib_parse_unquote
|
||||||
from ..networking.exceptions import HTTPError
|
from ..networking.exceptions import HTTPError
|
||||||
from ..utils import (
|
from ..utils import (
|
||||||
|
KNOWN_EXTENSIONS,
|
||||||
|
ExtractorError,
|
||||||
clean_html,
|
clean_html,
|
||||||
determine_ext,
|
determine_ext,
|
||||||
ExtractorError,
|
|
||||||
int_or_none,
|
int_or_none,
|
||||||
KNOWN_EXTENSIONS,
|
|
||||||
mimetype2ext,
|
mimetype2ext,
|
||||||
parse_iso8601,
|
parse_iso8601,
|
||||||
str_or_none,
|
str_or_none,
|
||||||
traverse_obj,
|
traverse_obj,
|
||||||
try_get,
|
try_get,
|
||||||
url_or_none,
|
url_or_none,
|
||||||
|
urljoin,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@ -404,8 +404,8 @@ def _entries(self, campaign_id):
|
|||||||
posts_json = self._call_api('posts', campaign_id, query=params, note='Downloading posts page %d' % page)
|
posts_json = self._call_api('posts', campaign_id, query=params, note='Downloading posts page %d' % page)
|
||||||
|
|
||||||
cursor = traverse_obj(posts_json, ('meta', 'pagination', 'cursors', 'next'))
|
cursor = traverse_obj(posts_json, ('meta', 'pagination', 'cursors', 'next'))
|
||||||
for post in posts_json.get('data') or []:
|
for post_url in traverse_obj(posts_json, ('data', ..., 'attributes', 'patreon_url')):
|
||||||
yield self.url_result(url_or_none(traverse_obj(post, ('attributes', 'patreon_url'))), 'Patreon')
|
yield self.url_result(urljoin('https://www.patreon.com/', post_url), PatreonIE)
|
||||||
|
|
||||||
if cursor is None:
|
if cursor is None:
|
||||||
break
|
break
|
||||||
|
Loading…
Reference in New Issue
Block a user