blackjack4494 / youtube-dlc

Command-line program to download various media from YouTube.com and other sites
https://blackjack4494.github.io/youtube-dlc/
The Unlicense
1.21k stars 13 forks source link

adobepass returning 401 or unable to extract post url error #80

Open sufr3ak opened 4 years ago

sufr3ak commented 4 years ago

Checklist

Verbose log

[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['--verbose', '--get-filename', '--ap-mso', 'Comcast_SSO', '--ap-username', 'PRIVATE', '--ap-password', 'PRIVATE', 'https://disneynow.com/shows/fancy-nancy/season-02/episode-10-nancy-rocks-the-boat-spring-dress-mess/vdka18980859']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dlc version 2020.09.12
[debug] Python version 3.6.9 (CPython) - Linux-4.15.0-112-generic-x86_64-with-Ubuntu-18.04-bionic
[debug] exe versions: ffmpeg N-50726-g20c5f4d835-static, ffprobe N-50726-g20c5f4d835-static
[debug] Proxy map: {}
ERROR: Unable to download webpage: HTTP Error 401: Unauthorized (caused by <HTTPError 401: 'Unauthorized'>); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dlc -U  to update. Be sure to call youtube-dlc with the --verbose flag and include its complete output.
  File "/usr/local/bin/youtube-dlc/youtube_dlc/extractor/common.py", line 627, in _request_webpage
    return self._downloader.urlopen(url_or_request)
  File "/usr/local/bin/youtube-dlc/youtube_dlc/YoutubeDL.py", line 2236, in urlopen
    return self._opener.open(req, timeout=self._socket_timeout)
  File "/usr/lib/python3.6/urllib/request.py", line 532, in open
    response = meth(req, response)
  File "/usr/lib/python3.6/urllib/request.py", line 642, in http_response
    'http', request, response, code, msg, hdrs)
  File "/usr/lib/python3.6/urllib/request.py", line 570, in error
    return self._call_chain(*args)
  File "/usr/lib/python3.6/urllib/request.py", line 504, in _call_chain
    result = func(*args)
  File "/usr/lib/python3.6/urllib/request.py", line 650, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)

Description

When using the tool off the providers network, a 401 error is produced. When on their network, a "ERROR: Unable to extract post url; " is generated.

https://github.com/ytdl-org/youtube-dl/issues/26558#issue-696714081

johannvonperfect commented 4 years ago

Ditto.

blackjack4494 commented 3 years ago

I am not exactly sure where the error is here as I haven't dealt with adobepass so far.
@sufr3ak are you still experiencing this issue? There is a commit that may will help. Next release will come out soon.

johannvonperfect commented 3 years ago

I downloaded 2020.09.30 release. Still has the same issue. (The error appears to be the same with the same verbose responses - the line numbers are different but I am guessing this is just due to code revisions rather than being something new.)

johannvonperfect commented 3 years ago

The issue is still there with the 2020.10.09 release.

merval commented 3 years ago

I started tweaking the code to get the output of the post_url page, and it appears I'm being auto-logged in but nothing is catching it:

`

You're automatically signed in with Xfinity and ready to watch.

Access to this experience is an added benefit of your Xfinity TV service.

`
johannvonperfect commented 3 years ago

Thanks for taking a look at it. If you just want to scratch the itch of resolving it, please do! However, FWIW, I have gotten around this issue in newer releases of yt-dlc by using cookies. I have no developing ability so I could not tell you what change fixed it, since in the past cookies did not work either.

I log in to whatever site (sometimes need to sign out and sign back in) before generating the cookies file. I then use this syntax (also works with single links):

youtube-dlc --ap-mso=Comcast_SSO --ap-username [comcast username] --ap-password [comcast password] --cookies cookies.txt --batch-file links.txt --ignore-errors

(sufr3ak and I appeared to be the only ones participating on this project as well as OG yt-dl, and we sorted it out over there before the issue was...closed as a duplicate without any interaction from the developers. Surprising I know.)

merval commented 3 years ago

Sadly that seems to be a common thread over there. :(

I was looking at it earlier but had other stuff I needed to get done. I'll have to familiarize myself with that code to see if I can figure it out. Using cookies works because it just injects the cookie data into request, which bypasses the need to authenticate.