2

如何在我的 ios 应用程序中使用youtube-dl脚本?脚本可以有两种形式:

  1. 多个 *.py 脚本文件
  2. 一个可执行文件“youtube-dl”(它可以作为一个简单的命令在终端中运行)

我在项目中嵌入了python库(作为框架):

#include <Python/Python.h>

如何在应用程序中运行 youtube-dl 脚本?

4

2 回答 2

0

如果您只需要播放来自 Youtube 的视频,请使用https://github.com/0xced/XCDYouTubeKit

要使用该库,您只需要知道 VideoID YouTube:

XCDYouTubeVideoPlayerViewController *videoPlayerViewController = [[XCDYouTubeVideoPlayerViewController alloc] initWithVideoIdentifier:@"9bZkp7q19f0"];
[self presentMoviePlayerViewControllerAnimated:videoPlayerViewController];
于 2015-05-19T12:15:33.437 回答
0

您可以在https://github.com/kewlbear/YoutubeDL查看我的代码。这是 Swift 代码,但我认为它会有所帮助。

于 2020-11-25T14:28:58.010 回答