yt-dlp: `--ap-mso Comcast_SSO` broken

Checklist

  • I’m reporting a broken site support issue
  • I’ve verified that I’m running yt-dlp version 2021.07.07
  • I’ve checked that all provided URLs are alive and playable in a browser
  • I’ve checked that all URLs and arguments with special characters are properly quoted or escaped
  • I’ve searched the bugtracker for similar bug reports including closed ones
  • I’ve read bugs section in FAQ

Verbose log

[debug] Command-line config: ['--ap-mso', 'Comcast_SSO', '--ap-username', 'PRIVATE', '--ap-password', 'PRIVATE', '--all-subs', '--convert-subs', 'srt', '--verbose', 'https://abc.com/shows/when-nature-calls/episode-guide/season-01/03-dastardly-death-gunk-stuff']
[debug] Encodings: locale cp1252, fs utf-8, out utf-8, pref cp1252
[debug] yt-dlp version 2021.07.07 (exe)
[debug] Python version 3.8.10 (CPython 64bit) - Windows-10-10.0.19043-SP0
[debug] exe versions: ffmpeg 2021-07-14-git-ca56299fb3-full_build-www.gyan.dev, ffprobe 2021-07-14-git-ca56299fb3-full_build-www.gyan.dev
[debug] Proxy map: {}
[debug] [Go] Extracting URL: https://abc.com/shows/when-nature-calls/episode-guide/season-01/03-dastardly-death-gunk-stuff
ERROR: Unable to download webpage: HTTP Error 401: Unauthorized (caused by <HTTPError 401: 'Unauthorized'>); please report this issue on  https://github.com/yt-dlp/yt-dlp . Make sure you are using the latest version; see  https://github.com/yt-dlp/yt-dlp  on how to update. Be sure to call yt-dlp with the --verbose flag and include its complete output.
  File "yt_dlp\extractor\common.py", line 680, in _request_webpage
  File "yt_dlp\YoutubeDL.py", line 3086, in urlopen
  File "urllib\request.py", line 531, in open
  File "urllib\request.py", line 640, in http_response
  File "urllib\request.py", line 569, in error
  File "urllib\request.py", line 502, in _call_chain
  File "urllib\request.py", line 649, in http_error_default



Description

Cannot get --ap-mso Comcast_SSO to work, no matter what I do. I have a legit login/password. I am off-network. I can watch the videos online using MS-Edge and Adobe Pass seems to work perfectly there. I have tried using --ap-mso, I have tried using the cookies file, a combination of both, but nothing seems to work. Please assist.

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 25 (4 by maintainers)

Commits related to this issue

Most upvoted comments

Changing the User Agent worked until last night and now abc.com is giving me “Unable to extract post url”.

I am not seeing any change adding cookies and using the firefox cookies.txt extension to extract cookies.

For what it’s worth, that is not solely a Comcast_SSO issue. That is a larger issue with yt-dlp’s handling of the ABC website and Adobe Pass (or rather, inability to handle them). A separate ticket has been created.

https://github.com/yt-dlp/yt-dlp/issues/10973

To clarify I also used the --user-agent switch

It looks like Comcast has indeed changed things in the last couple of days. I’m now seeing Unable to download webpage: HTTP Error 403: Forbidden (caused by <HTTPError 403: Forbidden>) when yt-dlp is trying to access the provider redirect page.

Digging through the traffic logs with --print-traffic, it looks like yt-dlp is getting 403 bounced by https://login.xfinity.com when it’s attempting to make the actual auth check.

One particularly noteworthy item is that the user agent yt-dlp defaults to is quite old. Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.74 Safari/537.36, which stands out like a sore thumb when we’re up to Chrome 128.

On a lark, I overrode the user agent with the --user-agent switch, changing it to the current Chrome Linux UA Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36

That seemed to work. I was able to get a proper response from the Xfinity login server, which auto-logged me in and sent yt-dlp on its merry way.

Perhaps it’s happenstance. But it does seem to be working here. So give it a try.

I posted this in #7841 but perhaps the people here can test it as well as some of the more recent errors here seem to be the same. You’ll need to of installed yt-dlp through python & pip or equivalent so you can edit the files. You can find the a likely directory yt_dlp is installed to by running python -c "import site; print(site.getsitepackages())" Then you can do the following to the yt_dlp/extractor/adobepass.py file:

https://github.com/yt-dlp/yt-dlp/blob/099fb1b35cf835303306549f5113d1802d79c9c7/yt_dlp/extractor/adobepass.py#L1473=

change line 1473 of adobepass.py from elif 'automatically signed in with' in provider_redirect_page: to elif ('automatically signed in with' in provider_redirect_page) or ('initInterstitialRedirect' in provider_redirect_page):