lonsty/xvideos-dl

WinError 2 when trying to run

dougyp opened this issue ยท 3 comments

๐Ÿ› Bug Report

I am running on a Windows 10 machine with gitbash. I installed the software and no errors during installation. When I run it, it never did ask for the cookie (first problem)

But when I try to run it for any URL at xvideos it gives the video name, video page, resolution, etc. and then an error. Here is the output with one random sample:

$ xvideos-dl https://www.xvideos.com/video65461739/madison_summers_step_brother_cums_in_his_pants
Downloading: โš“
Video ID : 65461739
Video Name : Madison Summers Step Brother Cums In His Pants
Video Page : https://www.xvideos.com/video65461739/_
Resolution : 720p @ 1280x720
Destination: C:\Users\doug\Downloads\xvideos\Madison Summers Step Brother Cums
In His Pants(#65461739).mp4
[WinError 2] The system cannot find the file specified

๐Ÿ”ฌ How To Reproduce

Steps to reproduce the behavior:

  1. Run xvideo-dl from the command prompt

Code sample

Environment

  • OS: [e.g. Linux / Windows / macOS] Windows 10 running gitbash
  • Python version, get it with: Python version 3.7.0
python --version

Screenshots

๐Ÿ“ˆ Expected behavior

I hoped it would create a file. It does create ./xvideos folder.

๐Ÿ“Ž Additional context

When I ran it, it never asked for the cookie like the instructions said it would. I did finally create a file ~/.xvideo/cookie and pasted "session_token=". But that made no difference.

Hello @dougyp, thank you for your interest in our work!

If this is a bug report, please provide screenshots and minimum viable code to reproduce your issue, otherwise we can not help you.

The cause of the error is that the ffmpeg command was not found. Refer to the following steps to install it and set environment variables:

  1. Download a built windows package from https://ffmpeg.org/download.html#build-windows, an available: https://www.gyan.dev/ffmpeg/builds/ffmpeg-git-essentials.7z
  2. Unzip it to anywhere. For example: G:\Downloads\Develop\ffmpeg-2021-12-02-git-4a6aece703-essentials_build
  3. Run following two command on CMD or GItBash to add ffmpeg bin folder to environment variables. The set command only sets the environment variable for the current session. The setx command sets it permanently. Or you can set on Settings Window, refer here.
set PATH="%PATH%;G:\Downloads\Develop\ffmpeg-2021-12-02-git-4a6aece703-essentials_build\bin"
setx PATH "%PATH%;G:\Downloads\Develop\ffmpeg-2021-12-02-git-4a6aece703-essentials_build\bin"

In addition, downloading a single video via ffmpeg does not require cookies, so this is not a problem.

@lonsty perfect - that was the problem and worked fine! sorry to report it "as a bug" but I didn't see where I can ask "support" questions. thank you for your time.