diff options
author | bashonly <88596187+bashonly@users.noreply.github.com> | 2024-05-30 18:04:27 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-30 23:04:27 +0000 |
commit | 2e5a47da400b645aadbda6afd1156bd89c744f48 (patch) | |
tree | 48f99af54dfd0d35873b307e81106d6efb33930d | |
parent | 5fdd13006a1c5d78642c8d3c4c7df0448273c2ae (diff) |
[ie/PatreonCampaign] Fix `campaign_id` extraction (#10070)
Closes #10013
Authored by: bashonly
-rw-r--r-- | yt_dlp/extractor/patreon.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/yt_dlp/extractor/patreon.py b/yt_dlp/extractor/patreon.py index 6c441ff34..efbface4b 100644 --- a/yt_dlp/extractor/patreon.py +++ b/yt_dlp/extractor/patreon.py @@ -486,7 +486,8 @@ class PatreonCampaignIE(PatreonBaseIE): campaign_id, vanity = self._match_valid_url(url).group('campaign_id', 'vanity') if campaign_id is None: webpage = self._download_webpage(url, vanity, headers={'User-Agent': self.USER_AGENT}) - campaign_id = self._search_regex(r'https://www.patreon.com/api/campaigns/(\d+)/?', webpage, 'Campaign ID') + campaign_id = self._search_nextjs_data( + webpage, vanity)['props']['pageProps']['bootstrapEnvelope']['pageBootstrap']['campaign']['data']['id'] params = { 'json-api-use-default-includes': 'false', |