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
132.77k stars 10.07k forks source link

[Packtpub] ERROR: The recaptcha solution is missing. #24352

Closed shaileshaanand closed 4 years ago

shaileshaanand commented 4 years ago

Checklist

Verbose log

youtube-dl https://subscription.packtpub.com/video/web-development/9781789539509 --username hidden --verbose
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['https://subscription.packtpub.com/video/web-development/9781789539509', '--username', 'PRIVATE', '--verbose']
Type account password and press [Return]: 
[debug] Encodings: locale UTF-8, fs utf-8, out utf-8, pref UTF-8
[debug] youtube-dl version 2020.03.08
[debug] Git HEAD: 39eb11694
[debug] Python version 3.8.1 (CPython) - Linux-5.5.7-arch1-1-x86_64-with-glibc2.2.5
[debug] exe versions: ffmpeg 4.2.2, ffprobe 4.2.2
[debug] Proxy map: {}
[PacktPubCourse] 9781789539509: Downloading JSON metadata
[PacktPubCourse] 9781789539509: Downloading JSON metadata
[download] Downloading playlist: Modern JavaScript From The Beginning [Video]
[PacktPubCourse] playlist Modern JavaScript From The Beginning [Video]: Collected 119 video ids (downloading 119 of them)
[download] Downloading video 1 of 119
[PacktPub] Downloading Authorization Token
ERROR: The recaptcha solution is missing.
Traceback (most recent call last):
  File "/home/shailesh/projects/youtube-dl/youtube_dl/extractor/common.py", line 627, in _request_webpage
    return self._downloader.urlopen(url_or_request)
  File "/home/shailesh/projects/youtube-dl/youtube_dl/YoutubeDL.py", line 2238, in urlopen
    return self._opener.open(req, timeout=self._socket_timeout)
  File "/usr/lib64/python3.8/urllib/request.py", line 531, in open
    response = meth(req, response)
  File "/usr/lib64/python3.8/urllib/request.py", line 640, in http_response
    response = self.parent.error(
  File "/usr/lib64/python3.8/urllib/request.py", line 569, in error
    return self._call_chain(*args)
  File "/usr/lib64/python3.8/urllib/request.py", line 502, in _call_chain
    result = func(*args)
  File "/usr/lib64/python3.8/urllib/request.py", line 649, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 400: Bad Request

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/shailesh/projects/youtube-dl/youtube_dl/extractor/packtpub.py", line 56, in _real_initialize
    self._TOKEN = self._download_json(
  File "/home/shailesh/projects/youtube-dl/youtube_dl/extractor/common.py", line 888, in _download_json
    res = self._download_json_handle(
  File "/home/shailesh/projects/youtube-dl/youtube_dl/extractor/common.py", line 867, in _download_json_handle
    res = self._download_webpage_handle(
  File "/home/shailesh/projects/youtube-dl/youtube_dl/extractor/common.py", line 660, in _download_webpage_handle
    urlh = self._request_webpage(url_or_request, video_id, note, errnote, fatal, data=data, headers=headers, query=query, expected_status=expected_status)
  File "/home/shailesh/projects/youtube-dl/youtube_dl/extractor/common.py", line 645, in _request_webpage
    raise ExtractorError(errmsg, sys.exc_info()[2], cause=err)
youtube_dl.utils.ExtractorError: Unable to download JSON metadata: HTTP Error 400: Bad Request (caused by <HTTPError 400: 'Bad Request'>); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
Traceback (most recent call last):
  File "/home/shailesh/projects/youtube-dl/youtube_dl/extractor/common.py", line 627, in _request_webpage
    return self._downloader.urlopen(url_or_request)
  File "/home/shailesh/projects/youtube-dl/youtube_dl/YoutubeDL.py", line 2238, in urlopen
    return self._opener.open(req, timeout=self._socket_timeout)
  File "/usr/lib64/python3.8/urllib/request.py", line 531, in open
    response = meth(req, response)
  File "/usr/lib64/python3.8/urllib/request.py", line 640, in http_response
    response = self.parent.error(
  File "/usr/lib64/python3.8/urllib/request.py", line 569, in error
    return self._call_chain(*args)
  File "/usr/lib64/python3.8/urllib/request.py", line 502, in _call_chain
    result = func(*args)
  File "/usr/lib64/python3.8/urllib/request.py", line 649, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 400: Bad Request

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/shailesh/projects/youtube-dl/youtube_dl/extractor/packtpub.py", line 56, in _real_initialize
    self._TOKEN = self._download_json(
  File "/home/shailesh/projects/youtube-dl/youtube_dl/extractor/common.py", line 888, in _download_json
    res = self._download_json_handle(
  File "/home/shailesh/projects/youtube-dl/youtube_dl/extractor/common.py", line 867, in _download_json_handle
    res = self._download_webpage_handle(
  File "/home/shailesh/projects/youtube-dl/youtube_dl/extractor/common.py", line 660, in _download_webpage_handle
    urlh = self._request_webpage(url_or_request, video_id, note, errnote, fatal, data=data, headers=headers, query=query, expected_status=expected_status)
  File "/home/shailesh/projects/youtube-dl/youtube_dl/extractor/common.py", line 645, in _request_webpage
    raise ExtractorError(errmsg, sys.exc_info()[2], cause=err)
youtube_dl.utils.ExtractorError: Unable to download JSON metadata: HTTP Error 400: Bad Request (caused by <HTTPError 400: 'Bad Request'>); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/shailesh/projects/youtube-dl/youtube_dl/YoutubeDL.py", line 797, in extract_info
    ie_result = ie.extract(url)
  File "/home/shailesh/projects/youtube-dl/youtube_dl/extractor/common.py", line 529, in extract
    self.initialize()
  File "/home/shailesh/projects/youtube-dl/youtube_dl/extractor/common.py", line 433, in initialize
    self._real_initialize()
  File "/home/shailesh/projects/youtube-dl/youtube_dl/extractor/packtpub.py", line 65, in _real_initialize
    raise ExtractorError(message, expected=True)
youtube_dl.utils.ExtractorError: The recaptcha solution is missing.

Description

Packtpub has added Recaptcha to their login page which seems to break the login, passing cookie file does not help either. I am ready to provide login credentials for testing. URL used for testing: https://subscription.packtpub.com/video/web-development/9781789539509

dstftw commented 4 years ago

You must provide reproducible environment.