我有一个非常 loooong 的 YouTube 视频列表(在 Google 表格中)并且想要获得它们的持续时间。
您可以使用 importxml 拉它:
=IMPORTXML("youtube url","//*[@itemprop='duration']/@content")
Run Code Online (Sandbox Code Playgroud)
格式返回为 PT7M54S,这意味着 7 分 54 秒,所以如果你想转换它,你可以这样做:
=REGEXREPLACE(IMPORTXML("youtube url","//*[@itemprop='duration']/@content"),"(PT)(\d+)M(\d+)S","$2:$3")
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1354 次 |
| 最近记录: |