youtube-dl icon indicating copy to clipboard operation
youtube-dl copied to clipboard

XVideos: ERROR: Unable to download webpage: HTTP Error 404: Not Found (caused by HTTPError())

Open Quix0r opened this issue 2 years ago • 9 comments

Checklist

  • [ ] I'm reporting a broken site support issue (do you mean with site a broken plugin?)
  • [x] I've verified that I'm running youtube-dl version 2021.12.17
  • [x] I've checked that all provided URLs are alive and playable in a browser
  • [x] I've checked that all URLs and arguments with special characters are properly quoted or escaped
  • [x] I've searched the bugtracker for similar bug reports including closed ones
  • [x] I've read bugs section in FAQ

Verbose log

$ /opt/bin/youtube-dl --verbose https://www.xvideos.com/videoXXXXX/foo_bar_hey
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'--verbose', u'https://www.xvideos.com/videoXXXXX/foo_bar_hey']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2021.12.17
[debug] Python version 2.7.18 (CPython) - Linux-5.10.0-8-amd64-x86_64-with-debian-11.0
[debug] exe versions: ffmpeg 4.4, ffprobe present, rtmpdump 2.4
[debug] Proxy map: {}
[XVideos] 32272009: Downloading webpage
ERROR: Unable to download webpage: HTTP Error 404: Not Found (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 "/opt/bin/youtube-dl/youtube_dl/extractor/common.py", line 634, in _request_webpage
    return self._downloader.urlopen(url_or_request)
  File "/opt/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 2288, in urlopen
    return self._opener.open(req, timeout=self._socket_timeout)
  File "/usr/lib/python2.7/urllib2.py", line 435, in open
    response = meth(req, response)
  File "/usr/lib/python2.7/urllib2.py", line 548, in http_response
    'http', request, response, code, msg, hdrs)
  File "/usr/lib/python2.7/urllib2.py", line 473, in error
    return self._call_chain(*args)
  File "/usr/lib/python2.7/urllib2.py", line 407, in _call_chain
    result = func(*args)
  File "/usr/lib/python2.7/urllib2.py", line 556, in http_error_default
    raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
$

Description

I have tried to download a (any!) video from XVideos and it always fails with the above error message. For privacy reasons the URL in the log is obscured (to much intimacy would be exposed) but you can take ANY video URL from there.

Quix0r avatar May 12 '22 16:05 Quix0r

They have changed some things in the youtube_dl/extractor/xvideos.py file. They did not build new binaries since this fix. Clone the repo somewhere using git clone https://github.com/ytdl-org/youtube-dl (If this failed, please install git using sudo apt install git. Then browse to youtube_dl folder and do python __main__.py (if python command does not work, please try python3) and the the arguments. For you it's --verbose https://www.xvideos.com/videoXXXXX/foo_bar_hey. Make sure to install python using sudo apt install python3.

BreadJS avatar May 12 '22 19:05 BreadJS

In OP's environment, just install the master branch:

python -m pip install 'https://github.com/ytdl-org/youtube-dl/archive/refs/heads/master.tar.gz'

See https://adamj.eu/tech/2019/03/11/pip-install-from-a-git-repository/.

dirkf avatar May 13 '22 15:05 dirkf

Getting a similar issue for a twitch clip I'm using the latest bin release of youtube-dl for linux

I'm trying to download a twitch clip using youtube-dl through a node.js app

console.log("Executing: " + `./youtube-dl ${clipLink} -o ${clipsFolder}/${clipTitle}.mp4`)
execSync(`./youtube-dl ${clipLink} -o ${clipsFolder}/clip${index}.mp4`);

the command im executing there works through the terminal but when done through the node app i get this error:

Executing: ./youtube-dl https://production.assets.clips.twitchcdn.net/AT-cm%7CKvyqkeREW5ETF3Sf_KheYA.mp4?sig=4d112865666fab9ee3b556eac64783920f5372b6&token=%7B%22authorization%22%3A%7B%22forbidden%22%3Afalse%2C%22reason%22%3A%22%22%7D%2C%22clip_uri%22%3A%22https%3A%2F%2Fproduction.assets.clips.twitchcdn.net%2FAT-cm%257CKvyqkeREW5ETF3Sf_KheYA.mp4%22%2C%22device_id%22%3Anull%2C%22expires%22%3A1652539411%2C%22user_id%22%3A%22%22%2C%22version%22%3A2%7D -o clips/Dono wants xQc to gamble his $105 donation.mp4
/bin/sh: line 1: -o: command not found
WARNING: Could not send HEAD request to https://production.assets.clips.twitchcdn.net/AT-cm%7CKvyqkeREW5ETF3Sf_KheYA.mp4?sig=4d112865666fab9ee3b556eac64783920f5372b6: HTTP Error 404: 
ERROR: Unable to download webpage: HTTP Error 404:  (caused by <HTTPError 404: ''>); 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.
node:internal/errors:841
  const err = new Error(message);
              ^

Error: Command failed: ./youtube-dl https://production.assets.clips.twitchcdn.net/AT-cm%7CKvyqkeREW5ETF3Sf_KheYA.mp4?sig=4d112865666fab9ee3b556eac64783920f5372b6&token=%7B%22authorization%22%3A%7B%22forbidden%22%3Afalse%2C%22reason%22%3A%22%22%7D%2C%22clip_uri%22%3A%22https%3A%2F%2Fproduction.assets.clips.twitchcdn.net%2FAT-cm%257CKvyqkeREW5ETF3Sf_KheYA.mp4%22%2C%22device_id%22%3Anull%2C%22expires%22%3A1652539411%2C%22user_id%22%3A%22%22%2C%22version%22%3A2%7D -o clips/clip0.mp4
/bin/sh: line 1: -o: command not found
WARNING: Could not send HEAD request to https://production.assets.clips.twitchcdn.net/AT-cm%7CKvyqkeREW5ETF3Sf_KheYA.mp4?sig=4d112865666fab9ee3b556eac64783920f5372b6: HTTP Error 404: 
ERROR: Unable to download webpage: HTTP Error 404:  (caused by <HTTPError 404: ''>); 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.

    at checkExecSyncError (node:child_process:828:11)
    at execSync (node:child_process:899:15)
    at /home/demented/repos/twitch-clips-bot/dl-clip.js:34:9
    at Array.forEach (<anonymous>)
    at /home/demented/repos/twitch-clips-bot/dl-clip.js:27:11 {
  status: 127,
  signal: null,
  output: [
    null,
    Buffer(118) [Uint8Array] [
       91, 103, 101, 110, 101, 114, 105,  99,  93,  32,  65,  84,
       45,  99, 109, 124,  75, 118, 121, 113, 107, 101,  82,  69,
       87,  53,  69,  84,  70,  51,  83, 102,  95,  75, 104, 101,
       89,  65,  58,  32,  82, 101, 113, 117, 101, 115, 116, 105,
      110, 103,  32, 104, 101,  97, 100, 101, 114,  10,  91, 103,
      101, 110, 101, 114, 105,  99,  93,  32,  65,  84,  45,  99,
      109, 124,  75, 118, 121, 113, 107, 101,  82,  69,  87,  53,
       69,  84,  70,  51,  83, 102,  95,  75, 104, 101,  89,  65,
       58,  32,  68, 111,
      ... 18 more items
    ],
    Buffer(520) [Uint8Array] [
       47,  98, 105, 110,  47, 115, 104,  58,  32, 108, 105, 110,
      101,  32,  49,  58,  32,  45, 111,  58,  32,  99, 111, 109,
      109,  97, 110, 100,  32, 110, 111, 116,  32, 102, 111, 117,
      110, 100,  10,  87,  65,  82,  78,  73,  78,  71,  58,  32,
       67, 111, 117, 108, 100,  32, 110, 111, 116,  32, 115, 101,
      110, 100,  32,  72,  69,  65,  68,  32, 114, 101, 113, 117,
      101, 115, 116,  32, 116, 111,  32, 104, 116, 116, 112, 115,
       58,  47,  47, 112, 114, 111, 100, 117,  99, 116, 105, 111,
      110,  46,  97, 115,
      ... 420 more items
    ]
  ],
  pid: 34528,
  stdout: Buffer(118) [Uint8Array] [
     91, 103, 101, 110, 101, 114, 105,  99,  93,  32,  65,  84,
     45,  99, 109, 124,  75, 118, 121, 113, 107, 101,  82,  69,
     87,  53,  69,  84,  70,  51,  83, 102,  95,  75, 104, 101,
     89,  65,  58,  32,  82, 101, 113, 117, 101, 115, 116, 105,
    110, 103,  32, 104, 101,  97, 100, 101, 114,  10,  91, 103,
    101, 110, 101, 114, 105,  99,  93,  32,  65,  84,  45,  99,
    109, 124,  75, 118, 121, 113, 107, 101,  82,  69,  87,  53,
     69,  84,  70,  51,  83, 102,  95,  75, 104, 101,  89,  65,
     58,  32,  68, 111,
    ... 18 more items
  ],
  stderr: Buffer(520) [Uint8Array] [
     47,  98, 105, 110,  47, 115, 104,  58,  32, 108, 105, 110,
    101,  32,  49,  58,  32,  45, 111,  58,  32,  99, 111, 109,
    109,  97, 110, 100,  32, 110, 111, 116,  32, 102, 111, 117,
    110, 100,  10,  87,  65,  82,  78,  73,  78,  71,  58,  32,
     67, 111, 117, 108, 100,  32, 110, 111, 116,  32, 115, 101,
    110, 100,  32,  72,  69,  65,  68,  32, 114, 101, 113, 117,
    101, 115, 116,  32, 116, 111,  32, 104, 116, 116, 112, 115,
     58,  47,  47, 112, 114, 111, 100, 117,  99, 116, 105, 111,
    110,  46,  97, 115,
    ... 420 more items
  ]
}

dement6d avatar May 13 '22 18:05 dement6d

Off-topic for this issue as Twitch != XVideos. Opened #30945 instead.

dirkf avatar May 13 '22 22:05 dirkf

i got this error with latest commit

E:\downloader\xvideos>youtube-dl -a xvideos_url.txt -o "%(playlist_id)s\%(title)s [%(id)s].%(ext)s" --embed-thumbnail --download-archive xvideos-downloaded.txt -r 1500k [generic] swaglive#_tabVideos: Requesting header WARNING: Falling back on generic information extractor. [generic] swaglive#_tabVideos: Downloading webpage [generic] swaglive#_tabVideos: Extracting information ERROR: Unsupported URL: https://www.xvideos.com/channels/swaglive#_tabVideos

afterdelight avatar May 24 '22 22:05 afterdelight

This dev branch needs to be pulled.

dirkf avatar Jun 01 '22 17:06 dirkf

then, can you pls merge it?

afterdelight avatar Jun 01 '22 23:06 afterdelight

They have changed some things in the youtube_dl/extractor/xvideos.py file. They did not build new binaries since this fix. Clone the repo somewhere using git clone https://github.com/ytdl-org/youtube-dl (If this failed, please install git using sudo apt install git. Then browse to youtube_dl folder and do python __main__.py (if python command does not work, please try python3) and the the arguments. For you it's --verbose https://www.xvideos.com/videoXXXXX/foo_bar_hey. Make sure to install python using sudo apt install python3.

that works, how do I build the binaries though?

br4nnigan avatar Aug 16 '22 21:08 br4nnigan

Confirm the bug with xvideos.com exists and confirm it disappears after installing from master branch. I suppose the new release is due.

selivan avatar Aug 18 '22 05:08 selivan

They have changed some things in the youtube_dl/extractor/xvideos.py file. They did not build new binaries since this fix. Clone the repo somewhere using git clone https://github.com/ytdl-org/youtube-dl (If this failed, please install git using sudo apt install git. Then browse to youtube_dl folder and do python __main__.py (if python command does not work, please try python3) and the the arguments. For you it's --verbose https://www.xvideos.com/videoXXXXX/foo_bar_hey. Make sure to install python using sudo apt install python3.

that works, how do I build the binaries though?

Tbh, I did not figure that out yet.

BreadJS avatar Oct 03 '22 14:10 BreadJS

See #30707.

dirkf avatar Oct 29 '22 15:10 dirkf