Skip to content

Commit

Permalink
[ie/adobepass] Use newer user-agent for provider redirect request (yt…
Browse files Browse the repository at this point in the history
…-dlp#11250)

Closes yt-dlp#10848
Authored by: bashonly
  • Loading branch information
bashonly authored Oct 14, 2024
1 parent cba7868 commit dcfeea4
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion yt_dlp/extractor/adobepass.py
Original file line number Diff line number Diff line change
Expand Up @@ -1355,6 +1355,7 @@
class AdobePassIE(InfoExtractor): # XXX: Conventionally, base classes should end with BaseIE/InfoExtractor
_SERVICE_PROVIDER_TEMPLATE = 'https://sp.auth.adobe.com/adobe-services/%s'
_USER_AGENT = 'Mozilla/5.0 (X11; Linux i686; rv:47.0) Gecko/20100101 Firefox/47.0'
_MODERN_USER_AGENT = 'Mozilla/5.0 (Windows NT 10.0; rv:131.0) Gecko/20100101 Firefox/131.0'
_MVPD_CACHE = 'ap-mvpd'

_DOWNLOADING_LOGIN_PAGE = 'Downloading Provider Login Page'
Expand Down Expand Up @@ -1454,7 +1455,11 @@ def extract_redirect_url(html, url=None, fatal=False):
'no_iframe': 'false',
'domain_name': 'adobe.com',
'redirect_url': url,
})
}, headers={
# yt-dlp's default user-agent is usually too old for Comcast_SSO
# See: https://github.com/yt-dlp/yt-dlp/issues/10848
'User-Agent': self._MODERN_USER_AGENT,
} if mso_id == 'Comcast_SSO' else None)
elif not self._cookies_passed:
raise_mvpd_required()

Expand Down

0 comments on commit dcfeea4

Please sign in to comment.