YouTube instant key code

简介: Heard of the story http://ytinstant.com/    So I saw the code, the primary code is in http://ytinstant.

Heard of the story http://ytinstant.com/ 

 

So I saw the code, the primary code is in http://ytinstant.com/instant6.js

 

 Firstly, search the suggestion words array from google:

 

var the_url = 'http://suggestqueries.google.com/complete/search?hl=en&ds=yt&client=youtube&hjson=t&jsonp=window.yt.www.suggest.handleResponse&q='+encodeURIComponent(searchBox.val())+'&cp=1';

$.ajax({

type:

"GET",

url: the_url,

dataType:

"script"

});

 

 

Secondly, load video from youtube videos api:

$.ajax({

type: "GET",

url: the_url,

dataType:

"jsonp",

success:

function(responseData, textStatus, XMLHttpRequest) {

 

if (responseData.data.items) {

updateVideoDisplay(responseData.data.items);

}

else {

updateSuggestedKeyword(

'No results for "'+keyword+'"');

}

doneWorking();

}

});

 

others is something typing call real time states changing.

目录
打赏
0
0
0
0
20
分享
相关文章
|
10月前
Google Earth Engine(GEE)——当加载图表的时候出现错误No features contain non-null values of “system:time_start“.
Google Earth Engine(GEE)——当加载图表的时候出现错误No features contain non-null values of “system:time_start“.
178 0
|
10月前
GEE错误:Dictionary does not contain key: bucketMeans.
GEE错误:Dictionary does not contain key: bucketMeans.
106 0
|
10月前
|
Google Earth Engine(GEE)——sentinel-1数据处理过程中出现错误Dictionary does not contain key: bucketMeans
Google Earth Engine(GEE)——sentinel-1数据处理过程中出现错误Dictionary does not contain key: bucketMeans
150 0
Open Source Instant Messaging (IM) Project OpenIM Source Code
Open Source Instant Messaging (IM) Project OpenIM Source Code
135 0
JsonSyntaxException: com.google.gson.stream.MalformedJsonException: Invalid escape sequence at line
JsonSyntaxException: com.google.gson.stream.MalformedJsonException: Invalid escape sequence at line
179 0
Google Earth Engine ——ee.List.sequence函数的使用
Google Earth Engine ——ee.List.sequence函数的使用
215 0
Google Earth Engine ——ee.List.sequence函数的使用
Google Earth Engine(GEE)——feature ‘1_1_1_1_1_1_1_1_0‘ is missing错误如何解决?
Google Earth Engine(GEE)——feature ‘1_1_1_1_1_1_1_1_0‘ is missing错误如何解决?
313 0
Google Earth Engine(GEE)——feature ‘1_1_1_1_1_1_1_1_0‘ is missing错误如何解决?
详讲Java开发中的六个常用API(Math,System,Object,Integer,Date)(二)
详讲Java开发中的六个常用API(Math,System,Object,Integer,Date)(二)
140 0
详讲Java开发中的六个常用API(Math,System,Object,Integer,Date)(二)
详讲Java开发中的六个常用API(Math,System,Object,Integer,Date)(一)
详讲Java开发中的六个常用API(Math,System,Object,Integer,Date)(一)
168 0
详讲Java开发中的六个常用API(Math,System,Object,Integer,Date)(一)
AI助理

你好,我是AI助理

可以解答问题、推荐解决方案等