搜索视频字幕信息
通过该接口可以根据关键词搜索单个视频的字幕信息,音频转写后可用,地址为:http://spark.bokecc.com/api/subtitle/search/video
需要传递以下参数:
| 参数 | 说明 | 
|---|---|
| userid | 用户 id,不可为空 | 
| videoid | 视频 id,不可为空 | 
| q | 查询的关键词,不可为空 | 
| num_per_page | 返回信息时,每页包含的字幕信息条数 注:允许范围为1~100 | 
| page | 当前页码 | 
| format | 返回格式,xml 或 json | 
返回数据subtiles包括如下字段:
| 字段名 | 说明 | 
|---|---|
| total | 返回字幕信息条数 | 
| subtitle | 字幕信息 | 
subtile包括如下字段:
| 字段名 | 说明 | 
|---|---|
| bg | 开始位置,单位:毫秒 | 
| ed | 结束位置,单位:毫秒 | 
| content | 字幕内容 | 
XML格式的返回信息如下:
<?xmlversion="1.0"encoding="UTF-8"?>
<subtitles>
<total>20</total>
   <subtitle>
       <bg>3000</bg>
   <ed>4000</ed>
   <content>abc</content>
   </subtitle>
   <subtitle>
       <bg>5000</bg>
   <ed>6000</ed>
   <content>abd</content>
   </subtitle>
   …
</subtitle>
JSON格式的返回信息如下:
{
"subtitles":{
"total":20
"subtitle":[
{
"bg":3000,    
"ed":4000,
"content":"abc",      
},
{
"bg":5000,    
"ed":6000,
"content":"abd",      
},
           …
]
}
}
 
           
              
              
              
