Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Please follow the guide below
xinto all the boxes [ ] relevant to your issue (like that [x])Make sure you are using the latest version: run
youtube-dl --versionand ensure your version is 2017.07.09. If it's not read this FAQ entry and update. Issues with outdated version will be rejected.Before submitting an issue make sure you have:
What is the purpose of your issue?
Hello,
I am using Youtube-dl Embedded in a Python program.
I am trying to avoid to have the errors printed on the console but it doesn't work. Here is what I do, with the option 'quiet':
ydl_opts = {
'format': format,
'quiet': True,
'postprocessors' : [{
'key': 'FFmpegExtractAudio',
'preferredcodec': extension
}]
}
And then (the ID is one parameter of my function) :
with youtube_dl.YoutubeDL(ydl_opts ) as ydl:
info=ydl.extract_info('http://www.youtube.com/watch?v='+ID, download=False)
url=info.get('url', None)
But, when I do that, I still have this kind of error written on the console:
"ERROR: AEyKx1XvCKo: YouTube said: "Beautiful Chinese Music?2?T..."
The YouTube account associated with this video has been terminated due to multip
le third-party notifications of copyright infringement." or "ERROR: AERXBUOVaK0: YouTube said: This video is no longer available because the YouTube account associated with this video has been terminated."
So, I tried another way, with subprocess:
link='http://www.youtube.com/watch?v='+ID
x=subprocess.Popen(['youtube_dl' ,'-g', link], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
url=x.stdout.read().decode()
But it doesn't work as well, I have the error "[WinError 2] The system cannot find the file specified".
I think that the best solution is the first, if it works, because youtube-dl Embedded has been created to avoid the subprocess I think!
Can you please explain me why the 'quiet' doesn't work? Or, if it is impossible to not print the errors with this option, why my subprocess doesn't work?
Thank you in advance!