我安装了最新版本的youtube-dl,它可以通过终端完美运行,但不能通过网络运行。
终端:(完美运行。下载视频。)
[****@****** bin]# /opt/ActivePython-2.7/bin/python /usr/bin/youtube-dl-test -g http://www.youtube.com/watch?v=d3rzmQqVszo
它可以通过终端使用php :(工作。下载视频)
[****@****** ****]# php test.php
但是当我通过网络访问它时失败了。 http://sifdsfdfdf.com/test.php
PHP脚本:(失败。空白页。)
$url=exec("/opt/ActivePython-2.7/bin/python /usr/bin/youtube-dl-test -g http://www.youtube.com/watch?v=d3rzmQqVszo");
echo $url;
错误日志:
Traceback (most recent call last):
File "/opt/ActivePython-2.7/lib/python2.7/runpy.py", line 162, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/opt/ActivePython-2.7/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/usr/bin/youtube-dl-test/__main__.py", line 15, in <module>
File "/usr/bin/youtube-dl-test/youtube_dl/__init__.py", line 70, in <module>
File "/usr/bin/youtube-dl-test/youtube_dl/utils.py", line 5, in <module>
File "/opt/ActivePython-2.7/lib/python2.7/ctypes/__init__.py", line 549, in <module>
CFUNCTYPE(c_int)(lambda: None)
MemoryError
由于