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.
Problem while running youtube-dl as a Python script #177
Comments
|
Sorry, I can't reproduce this problem on my machine. Can you include the full command-line which reproduces the problem? (Or does it occur when literally executing youtube-dl without arguments?) Also, a screenshot would be nice. What operating system and Python version are you on? |
|
phihad- python youtubedl.py -o 'filename.flv' http://youtube.com/watch?v=VIDEOID As I mentioned before, the video downloads fully, its just that youtube-dl doesn't close, so that the flow of my program can continue. |
|
Sorry samrat, but I need a little more information than that. A screenshot would be nice, and it should also contain the output of
For example, your above command shows the following result for me on debian sid (x64):
Also, if you're executing youtube-dl this in another program, could you share the relevant code portion? It might be a bug in there. |
|
Here's the code I used to execute youtube-dl: and the output:
|
|
You could also put the URL in quotes, but that will fail (and allow anyone who enters the URL shell access) if it contains quotes. |
|
phihag- I tried using subprocess too, the problem still persists. |
|
@samrat It's not about using subprocess in general, but the way you construct the command. Can you post an extract of the subprocess version of your code? |
|
|
|
@samrat This variant has the exact same problem, only with spaces instead of the ampersand in the URL. Why are you constructing the command as a string instead of a list, as I suggested? Also, can you reproduce the problem in an interactive shell? If not, can you give us (or upload) a small demo program that reproduces the issue without requiring any user input? |
|
@phihag- Thank you, constructing the command as a list seems to solve the problem. |
|
Can you please post how you solved the issue? |
|
@Anilmorab See my previous comment for the solution. |
When I try to run youtube-dl as a Python script using
python youtubedl.py(youtube.dl.py is a Python file with youtube-dl's source code), the download completes successfully but the Python script fails to terminate. How can this problem be solved?