如何在我的 ios 应用程序中使用youtube-dl脚本?脚本可以有两种形式:
- 多个 *.py 脚本文件
- 一个可执行文件“youtube-dl”(它可以作为一个简单的命令在终端中运行)
我在项目中嵌入了python库(作为框架):
#include <Python/Python.h>
如何在应用程序中运行 youtube-dl 脚本?
如何在我的 ios 应用程序中使用youtube-dl脚本?脚本可以有两种形式:
我在项目中嵌入了python库(作为框架):
#include <Python/Python.h>
如何在应用程序中运行 youtube-dl 脚本?
如果您只需要播放来自 Youtube 的视频,请使用https://github.com/0xced/XCDYouTubeKit
要使用该库,您只需要知道 VideoID YouTube:
XCDYouTubeVideoPlayerViewController *videoPlayerViewController = [[XCDYouTubeVideoPlayerViewController alloc] initWithVideoIdentifier:@"9bZkp7q19f0"];
[self presentMoviePlayerViewControllerAnimated:videoPlayerViewController];
您可以在https://github.com/kewlbear/YoutubeDL查看我的代码。这是 Swift 代码,但我认为它会有所帮助。