YouTube v3 上的说明换行符 API
Description linebreaks on YouTube v3 API
我一直在玩 YouTube API,但是当我尝试获取视频描述时,它显示为一长串没有换行符的字符串。是否有获取换行符的方法?
API 没有任何文档来解释这个问题。
当使用 API 上传视频时,我设置了 .Snippet.Description,我的数据包含 CrLf 字符导致换行。后来,当我通过 API 检索 Video 对象时,存在换行符。
请使用PHP_EOL,像这样:
$desp='Cette vidéo et trouvée sur: http://localhost/ '.PHP_EOL;
$desp.='Pour plus d\'infos visitez: http://localhost/123 '.PHP_EOL;
$desp.='CopyRight to: http://localhost/789';
$snippet->setDescription($desp);
我一直在玩 YouTube API,但是当我尝试获取视频描述时,它显示为一长串没有换行符的字符串。是否有获取换行符的方法?
API 没有任何文档来解释这个问题。
当使用 API 上传视频时,我设置了 .Snippet.Description,我的数据包含 CrLf 字符导致换行。后来,当我通过 API 检索 Video 对象时,存在换行符。
请使用PHP_EOL,像这样:
$desp='Cette vidéo et trouvée sur: http://localhost/ '.PHP_EOL;
$desp.='Pour plus d\'infos visitez: http://localhost/123 '.PHP_EOL;
$desp.='CopyRight to: http://localhost/789';
$snippet->setDescription($desp);