Italy.html 906 Bytes
<!DOCTYPE html>
<html>
<body>

<div><h1>이탈리아 음식</h1></div>

<script src="https://code.jquery.com/jquery-3.0.0.js"></script>
<script type="text/javascript">



let apikey = "AIzaSyC1UDfc18D0ebNPMRjC6LW9vzTZZEXlJak";
let keyword ="이탈리아 음식";



$.ajax({

	url:'https://www.googleapis.com/youtube/v3/search',

	type:'get',

	dataType:'json',

	data:{part:'snippet',key:apikey,q:keyword, maxResults:50,type:'video',videoEmbeddable:'true'},

	success:function (data){

		console.log(data);
		data.items.forEach(function(element,index){$('body').append('<iframe width="560" height="315" src="https://www.youtube.com/embed/'+element.id.videoId+' " frameborder="0" allow="accelerometer; autoplay;clipboard-write;encrypted-media;gyroscope;picture-in-picture" allowfullscreen></ifreame>');});
	},
	complete:function(data){},
	error:function(xhr,status,error){}
});



</script>
</body>
</html>