Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can’t Download Videos to Existing Folder #8683

Closed
RedSoxFan04 opened this issue Feb 27, 2016 · 26 comments
Closed

Can’t Download Videos to Existing Folder #8683

RedSoxFan04 opened this issue Feb 27, 2016 · 26 comments

Comments

@RedSoxFan04
Copy link

@RedSoxFan04 RedSoxFan04 commented Feb 27, 2016

When I specify a path in my configuration file, youtube-dl doesn’t put downloaded videos in the path I specified. Rather, it creates its own path in my user folder, which isn’t what I want. I’m trying to have the videos downloaded to my “youtube-dl” folder, which is in my “Movies” folder. How do I make youtube-dl put downloaded videos in my “youtube-dl” folder?

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Feb 27, 2016

@dstftw dstftw closed this Feb 27, 2016
@RedSoxFan04
Copy link
Author

@RedSoxFan04 RedSoxFan04 commented Feb 27, 2016

Not really. All you did was criticize my use of quotes. Your only suggestion was to remove the second%, which didn’t help.

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Feb 27, 2016

Because it does not work due to your wrong quotes.

@RedSoxFan04
Copy link
Author

@RedSoxFan04 RedSoxFan04 commented Feb 27, 2016

What do you mean it didn’t work? I used GitHub’s “insert code” button to format the text. How can that be an issue?

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Feb 27, 2016

It does not recognize path template properly due to inconsistent quotes.

@RedSoxFan04
Copy link
Author

@RedSoxFan04 RedSoxFan04 commented Feb 27, 2016

You’re talking about my configuration file. I thought you were talking about my use of quotes on GitHub.

@RedSoxFan04
Copy link
Author

@RedSoxFan04 RedSoxFan04 commented Feb 27, 2016

When I change the double quotes in my configuration file, I get this [debug] System config: [] [debug] User config: [u'\u2014o', u'\u2018\u2019\u2019/User/jfblagden/Movies/youtube-dl/%(title)s-.%(ext)s\u2019\u2019\u2019'] [debug] Command-line args: [u'-v', u'https://www.youtube.com/watch?v=ECcFGszb-Mo'] [debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8 [debug] youtube-dl version 2016.02.22 [debug] Python version 2.7.8 - Darwin-15.3.0-x86_64-i386-64bit [debug] exe versions: none [debug] Proxy map: {} ERROR: u'\u2014o' is not a valid URL. Set --default-search "ytsearch" (or run youtube-dl "ytsearch:—o" ) to search YouTube Traceback (most recent call last): File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 666, in extract_info ie_result = ie.extract(url) File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 316, in extract return self._real_extract(url) File "/usr/local/bin/youtube-dl/youtube_dl/extractor/generic.py", line 1204, in _real_extract % (url, url), expected=True) ExtractorError: u'\u2014o' is not a valid URL. Set --default-search "ytsearch" (or run youtube-dl "ytsearch:\u2014o" ) to search YouTube

The same thing happens when I use triple quotes.

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Feb 27, 2016

Post the command you are running and post the contents of your configuration file.

@RedSoxFan04
Copy link
Author

@RedSoxFan04 RedSoxFan04 commented Feb 27, 2016

Here’s the command I’m running: youtube-dl -v https://www.youtube.com/watch?v=Mi_nLFDPMuw

And here’s what I currently have in my configuration file: -- “/User/jfblagden/Movies/youtube-dl/%(title)s-.%(ext)s”

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Feb 27, 2016

Correct configuration file (just copy-paste to yours):

-o '/User/jfblagden/Movies/youtube-dl/%(title)s.%(ext)s'
@RedSoxFan04
Copy link
Author

@RedSoxFan04 RedSoxFan04 commented Feb 27, 2016

Here’s what I got when I used that:

Joshs-MacBook-Pro:~ jfblagden$ youtube-dl -v https://www.youtube.com/watch?v=Mi_nLFDPMuw
[debug] System config: []
[debug] User config: [u'-o', u'/User/jfblagden/Movies/youtube-dl/%(title)s.%(ext)s']
[debug] Command-line args: [u'-v', u'https://www.youtube.com/watch?v=Mi_nLFDPMuw']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2016.02.22
[debug] Python version 2.7.8 - Darwin-15.3.0-x86_64-i386-64bit
[debug] exe versions: none
[debug] Proxy map: {}
[youtube] Mi_nLFDPMuw: Downloading webpage
[youtube] Mi_nLFDPMuw: Downloading video info webpage
[youtube] Mi_nLFDPMuw: Extracting video information
[youtube] Mi_nLFDPMuw: Downloading MPD manifest
ERROR: unable to create directory [Errno 13] Permission denied: '/User'
Traceback (most recent call last):
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1477, in process_info
    os.makedirs(dn)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/os.py", line 150, in makedirs
    makedirs(head, mode)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/os.py", line 150, in makedirs
    makedirs(head, mode)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/os.py", line 150, in makedirs
    makedirs(head, mode)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/os.py", line 157, in makedirs
    mkdir(name, mode)
OSError: [Errno 13] Permission denied: '/User'
@dstftw
Copy link
Collaborator

@dstftw dstftw commented Feb 27, 2016

What's the output of echo $HOME?

@RedSoxFan04
Copy link
Author

@RedSoxFan04 RedSoxFan04 commented Feb 27, 2016

/Users/jfblagden

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Feb 27, 2016

It's Users not User. Correct your path in template. Or even simply replace with:

-o '~/Movies/youtube-dl/%(title)s.%(ext)s'
@RedSoxFan04
Copy link
Author

@RedSoxFan04 RedSoxFan04 commented Feb 27, 2016

That worked! Now it’s downloading videos to the right place and with the right extension.

Thank you!

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Feb 27, 2016

Just for my info, where the hell you get -- from into your config file?

@RedSoxFan04
Copy link
Author

@RedSoxFan04 RedSoxFan04 commented Feb 27, 2016

I got it from the Configuration section of the youtube-dl GitHub page.
screen shot 2016-02-27 at 3 49 12 pm

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Feb 27, 2016

There is no such example (with space after --) in example section.

@RedSoxFan04
Copy link
Author

@RedSoxFan04 RedSoxFan04 commented Feb 27, 2016

screen shot 2016-02-27 at 3 49 12 pm

@RedSoxFan04
Copy link
Author

@RedSoxFan04 RedSoxFan04 commented Feb 27, 2016

Because I saw the double dash there, I thought that you had to use double dashes in the configuration file and -o in Terminal. I didn’t understand that you use -o in both.

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Feb 27, 2016

How come a space after double dash? There is no such spaces in the example.

@RedSoxFan04
Copy link
Author

@RedSoxFan04 RedSoxFan04 commented Feb 27, 2016

I’m not sure how I made that mistake.

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Feb 27, 2016

Is it more clear now?

@RedSoxFan04
Copy link
Author

@RedSoxFan04 RedSoxFan04 commented Feb 27, 2016

Yeah, it is. Now I know to use “-o” instead of double quotes, and also that I need to make sure that “users” is plural instead of singular.

On Feb 27, 2016, at 4:14 PM, Sergey M. notifications@github.com wrote:

Is it more clear https://github.com/rg3/youtube-dl/blob/master/README.md#configuration now?


Reply to this email directly or view it on GitHub #8683 (comment).

@kwolk
Copy link

@kwolk kwolk commented Aug 3, 2016

I found that I had to put the configuration file (which should end in ".conf" but I don't see this detail in the notes) in the $Home folder. All the time I was putting it into the "~/.config/" directory, having to create a folder named "youtube-dl/config".

I think you should update your instructions on this, unless I am mistaken?

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Aug 3, 2016

which should end in ".conf" but I don't see this detail in the notes

Instructions updated in 899d2be. The configuration files section should be clear now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.