youtube-dl test video "'/\ä↭𝕐

By: Philipp Hagemeister

50   2   9732

Uploaded on 10/02/2012

test chars: "'/\ä↭𝕐
test URL: https://github.com/rg3/youtube-dl/issues/1892

This is a test video for youtube-dl.

For more information, contact phihag@phihag.de .

Comments (10):

By anonymous    2017-09-20

My crystal ball tells me that your URL contains ampersands, like https://www.youtube.com/watch?v=BaW_jenozKc&t=1s&end=9. In a shell, the ampersand makes the program run in the background (asynchronously).

Escape ampersands in URLs, by putting the whole URL in quotes:

youtube-dl 'https://www.youtube.com/watch?v=BaW_jenozKc&t=1s&end=9'

On Windows cmd, use double quotes instead:

youtube-dl "https://www.youtube.com/watch?v=BaW_jenozKc&t=1s&end=9"

Alternatively, escsape all problematic characters. Consult your shell handbook on which characters have special meanings and how to escape them. Oftentimes, a backslash will work:

 youtube-dl https://www.youtube.com/watch?v=BaW_jenozKc\&t=1s\&end=9

Original Thread

By anonymous    2017-09-20

Starting with youtube-dl 2017.03.16 - or right now if you check out the git repository - you can simply pass in --extract-audio --audio-format flac, as in:

youtube-dl -x --audio-format flac  https://www.youtube.com/watch?v=BaW_jenozKc

(-x is short for --extract-audio.)

Original Thread

By anonymous    2017-09-20

youtube-dl already contains this functionality - just specify that you want mp3:

youtube-dl -x --audio-format mp3 https://www.youtube.com/watch?v=BaW_jenozKc

Replace https://www.youtube.com/watch?v=BaW_jenozKc with your actual URL.

Original Thread

By anonymous    2017-09-23

Ok, I know that to get Mp3 files from Youtube-DL in a python program you use

from __future__ import unicode_literals
import youtube_dl


ydl_opts = {
'format': 'bestaudio/best',
'postprocessors': [{
    'key': 'FFmpegExtractAudio',
    'preferredcodec': 'mp3',
    'preferredquality': '192',
    }], 
}
with youtube_dl.YoutubeDL(ydl_opts) as ydl:
ydl.download(['http://www.youtube.com/watch?v=BaW_jenozKc'])

I have gotten that to work no problem. My problem is that i cannot get the -a or --batch file FILE to work with this I tried to set a Filesystem but that was just randomly guessing, and the information in the ReadMe is lacking for embedding.

Is there anyway to download youtube videos from a txt file using a Python program, or a resource online that explains embedding

Original Thread

By anonymous    2017-10-15

There is no need to write a configuration file; you can set the output template from python as well:

from __future__ import unicode_literals
import youtube_dl

ydl_opts = {
    'outtmpl': '/var/www/html/media/audio/%(title)s.%(ext)s',
    'extractaudio': True,
    'postprocessors': [{
        'key': 'FFmpegExtractAudio',
        'preferredcodec': 'mp3',
        'preferredquality': '320',
    }],
}
with youtube_dl.YoutubeDL(ydl_opts) as ydl:
    ydl.download(['https://www.youtube.com/watch?v=BaW_jenozKc'])

Original Thread

By anonymous    2017-12-11

I'm using youtube-dl on python 3.6.1 on my Mac, and I have followed the proper steps, which is this code:

from __future__ import unicode_literals
import youtube_dl
ydl_opts = {}
with youtube_dl.YoutubeDL(ydl_opts) as ydl:
    ydl.download(['http://www.youtube.com/watch?v=BaW_jenozKc'])

But it is giving me this error:

Traceback (most recent call last):
  File "/Users/Hussein/Downloads/youtube_dl.py", line 2, in <module>
    import youtube_dl
  File "/Users/Hussein/Downloads/youtube_dl.py", line 5, in <module>
    with youtube_dl.YoutubeDL(ydl_opts) as ydl:
AttributeError: module 'youtube_dl' has no attribute 'YoutubeDL'

Original Thread

By anonymous    2017-12-18

Here's the code:

from __future__ import unicode_literals
import youtube_dl


ydl_opts = {
    'format': 'bestaudio/best',
    'postprocessors': [{
        'key': 'FFmpegExtractAudio',
        'preferredcodec': 'mp3',
        'preferredquality': '192',
    }],
}
with youtube_dl.YoutubeDL(ydl_opts) as ydl:
    ydl.download(['http://www.youtube.com/watch?v=BaW_jenozKc'])

I pretty much copied this from download only audio from youtube video using youtube-dl in python script. The error that is coming up is:

AttributeError: module 'youtube_dl' has no attribute 'YoutubeDL'

I did lots of research but is seems youtube_dl is a pretty uncommon module. Essentially, it can get a ton of data off of youtube. The code I had was supposed to successfully grab audio from a youtube link of my desire. However, that same error always comes up. I ran it on python 2.7.13 and 3.6.3 - the same outcome on both. It seemed to have worked for otthers, and there was another thread about this here Can someone tell me what is causing the error so I can move onward with this project?

Original Thread

Recommended Books

    Submit Your Video

    If you have some great dev videos to share, please fill out this form.