List Youtube search results with ASP

List Youtube search results with ASP

Coding Archive

Coding Archive

List Youtube search results with ASP

With this unique code, you can list the video addresses of the results by searching youtube in the script.

First of all, we determine the variable to be searched on youtube and get the codes on the search results page with the XMLHttp method.

We determine the codes between the tags with the GetContent function from the result.

With the split method, we parse the video url addresses in the list and get the video we want from the list.

A unique code that will be useful for product promotions and content creation.
Use it in good times :)

<%
youtubequery="adidas shoe"

Set objHTTP = Server.CreateObject("MSXML2.ServerXMLHTTP")
url = "https://www.youtube.com/results?search_query="&youtubequery
objHTTP.open "GET", url, False
objHTTP.setRequestHeader "Content-Type", "text/html; charset=utf-8"
objHTTP.send() 
txt = objHTTP.responseText


Public Function GetContent(strContent, strPattern)
		Dim objRegExp, Matches
		Set objRegExp = New RegExp
		objRegExp.Pattern = strPattern
		objRegExp.IgnoreCase = True
		objRegExp.Global = True
		Set Matches = objRegExp.Execute(strContent)
			for each match in Matches
				GetContent = GetContent & match.Value
			next
		Set objRegExp = Nothing
	End Function
	
videourl=(GetContent(txt,":"&chr(34)&"/watch"&chr(63)&"([\s\S]*?),"))


listvideo=replace(replace(replace(videourl,chr(34),""),"/watch?v=",""),":","")

youtubevideo = Split(listvideo,",")

%>   

<%=youtubevideo(0)%>
<%=youtubevideo(1)%>
<%=youtubevideo(2)%>

List Youtube search results with ASP video tutorial, Coding Archive video tutorial, List Youtube search results with ASP Coding Archive tutorial, List Youtube search results with ASP Coding Archive watch video, List Youtube search results with ASP Coding Archive HD Video, With this unique code, you can list the video addresses of the results by searching youtube in the script. Coding Archive sample video, With this unique code, you can list the video addresses of the results by searching youtube in the script. Coding Archive video code , List Youtube search results with ASP learning video, List Youtube search results with ASP coding video

Coding Archive

In this area, I show advanced ASP - Active Server Pages coding and working styles and coding with MySQL, MSSQL, Oracle and other databases. - See All
Classic ASP XMLHTTP Url Html Code Viewer
You can do your transactions quickly with the Classic ASP code, where you can pull the html code structure from the url you connect with XMLHTTP.
ASP MySql Database Random Records
For Classic Asp MySql database random data this code is for you! You can use it in all your projects for Mysql database random data that works smoothly and fast.
Classic ASP CDO Message Mail Component Code
You can use the code I have given to send mail without any problems with the CDO component. Have peace of mind with this CDO code that works smoothly in your projects :)
Classic ASP XMLHTTP Set Timeout Code
With Classic ASP you can set the connection time limit when retrieving xml data. With the code I gave you, you can end long-term connection problems.
ASPJpeg Draw Image
You can examine the example of placing a logo on a photo with the Classic Asp ASPJpeg component with this code. You can use the Classic ASP AspJpeg component code piece that will always work for you in all your works.
Formatnumber ASP Classic Function
You can examine the Classic ASP formatnumber function in detail with the code I will give you.
Classic ASP ASPJpeg Component Full Code
I am giving all relevant code structure for writing on a photo with aspjpeg. I'm sure this code structure will be very useful for you.
Classic ASP Include File Code
For Classic ASP, you can benefit from the code structure I have given to call another asp file into the page.
Classic ASP Mysql Record Limit
If you want to set limits with classic asp in mysql table listing, you can use the code structure I have given.
Jquery Load Div From Another Page
This code will be useful for calling an external page with jquery inside the div tag.
Total Number of Records in Mysql Database with a Single Code
Asp Mysql Recordcount. This code is for you to quickly query the total number of data in the Mysql database table.
First Day and Last Day of the Month Date Function
With this asp vbscript function you can find the first and last day of a month. It is a very fast function that will work in your database filtering operations.