ytdl-org / youtube-dl

Command-line program to download videos from YouTube.com and other video sites
http://ytdl-org.github.io/youtube-dl/
The Unlicense
131.51k stars 9.96k forks source link

Adult Swim not working. Possible AP - MSO name change for xfinity? #30492

Open reikitsune opened 2 years ago

reikitsune commented 2 years ago

I can seem to get anything locked on adultswim downloaded, but free stuff works just fine. Using yt-dl gui. using following code in Extra menu: --cookies C:/Users/username/Desktop/cookies-www-adultswim-com.txt --ap-mso Comcast_SSO --ap-username USERNAME --ap-password PASSWORD

Am I doing anything wrong?

dirkf commented 2 years ago

For debugging, we need to see a log from the command-line tool, using cmd, Windows Terminal, or whatever.

First of all, to check whether extraction works, you need a command like this:

youtube-dl -F -v options url

Replace options by the stuff from the "Extra menu" and url by the URL of the video page. Parameters that contain special characters may need "double quotes".

TheKrunch commented 2 years ago

I am having a similar issue, possible the same issue. This is my log:

[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-F', '-v', '--ap-mso', 'Comcast_SSO', '--ap-username', 'PRIVATE', '--cookies', '.\\cookies.txt', 'https://www.adultswim.com/videos/smiling-friends/shrimps-odyssey']
Type TV provider account password and press [Return]:
[debug] Encodings: locale cp1252, fs mbcs, out cp437, pref cp1252
[debug] youtube-dl version 2021.12.17
[debug] Python version 3.4.4 (CPython) - Windows-10-10.0.18362
[debug] exe versions: ffmpeg 4.3.1-2021-01-26-full_build-www.gyan.dev, ffprobe 4.3.1-2021-01-26-full_build-www.gyan.dev
[debug] Proxy map: {}
[AdultSwim] shrimps-odyssey: Downloading JSON metadata
[AdultSwim] d0629a96d9616d420025ab3443731fea9ea76433: Downloading JSON metadata
[AdultSwim] d0629a96d9616d420025ab3443731fea9ea76433: Downloading Provider Redirect Page
ERROR: Unable to download webpage: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:600)> (caused by URLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:600)'),))
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpupik7c6w\build\youtube_dl\extractor\common.py", line 634, in _request_webpage
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpupik7c6w\build\youtube_dl\YoutubeDL.py", line 2288, in urlopen
  File "C:\Python\Python34\lib\urllib\request.py", line 470, in open
  File "C:\Python\Python34\lib\urllib\request.py", line 580, in http_response
  File "C:\Python\Python34\lib\urllib\request.py", line 502, in error
  File "C:\Python\Python34\lib\urllib\request.py", line 442, in _call_chain
  File "C:\Python\Python34\lib\urllib\request.py", line 685, in http_error_302
  File "C:\Python\Python34\lib\urllib\request.py", line 464, in open
  File "C:\Python\Python34\lib\urllib\request.py", line 482, in _open
  File "C:\Python\Python34\lib\urllib\request.py", line 442, in _call_chain
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpupik7c6w\build\youtube_dl\utils.py", line 2737, in https_open
  File "C:\Python\Python34\lib\urllib\request.py", line 1185, in do_open
TheKrunch commented 2 years ago

When I try adding --no-check-certificate I get:

[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-F', '-v', '--ap-mso', 'Comcast_SSO', '--ap-username', 'PRIVATE', '--cookies', '.\\cookies.txt', '--no-check-certificate', 'https://www.adultswim.com/videos/smiling-friends/shrimps-odyssey']
Type TV provider account password and press [Return]:
[debug] Encodings: locale cp1252, fs mbcs, out cp437, pref cp1252
[debug] youtube-dl version 2021.12.17
[debug] Python version 3.4.4 (CPython) - Windows-10-10.0.18362
[debug] exe versions: ffmpeg 4.3.1-2021-01-26-full_build-www.gyan.dev, ffprobe 4.3.1-2021-01-26-full_build-www.gyan.dev
[debug] Proxy map: {}
[AdultSwim] shrimps-odyssey: Downloading JSON metadata
[AdultSwim] d0629a96d9616d420025ab3443731fea9ea76433: Downloading JSON metadata
[AdultSwim] d0629a96d9616d420025ab3443731fea9ea76433: Downloading Provider Redirect Page
[AdultSwim] d0629a96d9616d420025ab3443731fea9ea76433: Logging in
[AdultSwim] d0629a96d9616d420025ab3443731fea9ea76433: Retrieving Session
ERROR: Unable to download webpage: HTTP Error 401: Unauthorized (caused by HTTPError()); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpupik7c6w\build\youtube_dl\extractor\common.py", line 634, in _request_webpage
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpupik7c6w\build\youtube_dl\YoutubeDL.py", line 2288, in urlopen
  File "C:\Python\Python34\lib\urllib\request.py", line 470, in open
  File "C:\Python\Python34\lib\urllib\request.py", line 580, in http_response
  File "C:\Python\Python34\lib\urllib\request.py", line 508, in error
  File "C:\Python\Python34\lib\urllib\request.py", line 442, in _call_chain
  File "C:\Python\Python34\lib\urllib\request.py", line 588, in http_error_default
TheKrunch commented 2 years ago

Work around I found: https://stackoverflow.com/a/42124169 This takes a little more work, but it did end up working.

  1. Login to adultswim.com with cable provider
  2. Get to page of video
  3. Open Developer Tools in your web browser
  4. Reload page (not sure if necessary but its what I did)
  5. Go to the Network tab, then search for "M3u8"
  6. Find the URL with "master" at the beginning
  7. Make sure its Type is "x-mpegurl"
  8. Right click the URL and select Copy URL
  9. Paste URL into console and use as URL for youtube-dl
dirkf commented 2 years ago

If the SSL error persists, check whether this happens in the browser. Depending on the system configuration, the root certificates used by yt-dl (ie, by Python) may be different from those used by the browser (eg, Firefox has its own) and may need to be updated following the DST R3 expiry: see eg here.

dirkf commented 2 years ago

In the second log, the procedure appears to be failing when retrieving the MSO Session (adobepass.py:1518) although the backtrace is truncated, so the failing URL is https://sp.auth.adobe.com/adobe-services/session.

Perhaps the mvp_headers, first used here, need to be updated to mention a newer FF version:

        mvpd_headers = {
            'ap_42': 'anonymous',
            'ap_11': 'Linux i686',
            'ap_z': 'Mozilla/5.0 (X11; Linux i686; rv:47.0) Gecko/20100101 Firefox/47.0',
            'User-Agent': 'Mozilla/5.0 (X11; Linux i686; rv:47.0) Gecko/20100101 Firefox/47.0',
        }