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.
Jython Support - locking #8302
Jython Support - locking #8302
Comments
|
Have you found a workaround for that yet? I'd like to embed youtube-dl in my java youtube downloader. |
|
Unless you need the def setproctitle(title):
returnIt seems to work fine. |
|
As far as I see editing the setproctitle() is not necessary. I removed the fcntl part however. Now it works when I don't provide any parameters for ydl_opts, if I do I get the following error:
Line 292 being My code is the following: public class Main {
public static void main(String[] args) {
PythonInterpreter python = new PythonInterpreter();
python.exec("print(\"test\")");
python.exec(
"from __future__ import unicode_literals\n" +
"import youtube_dl\n" +
"\n" +
"ydl_opts = {'listformats'}\n" +
"with youtube_dl.YoutubeDL(ydl_opts) as ydl:\n" +
" ydl.download(['http://www.youtube.com/watch?v=BaW_jenozKc'])"
);
}
}Any ideas? |
|
@mdPlusPlus |
|
Thank you, that worked. |
|
Basic Jython support will be included in the next version. |
|
Known issues on Jython:
|
Hi,
youtube-dl does not work with Jython (http://www.jython.org/), at least on Mac OS X (possibly on Windows). The problem is related to
import fcntlwhich doesn't exist in Jython :(https://github.com/rg3/youtube-dl/blob/6ec6cb4e956abbd76a6ff42336821770a5fbbcc7/youtube_dl/utils.py#L1219-L1225
Can additional support be added for "soft locking" ... for instance, like in this Python package: https://pypi.python.org/pypi/filelock/
Thanks,
Dustin