PDA

View Full Version : is it possible



JPHamlett
11-07-2009, 10:39 PM
To make a program that i could input names of songs then have the program youtube it click the first link and get the url and paste it on another program


it can be any language


and on a scale of 1/10 how hard would it be to acomplish for me


i have limited knowledge of some languages

Kyle Undefined
11-08-2009, 08:04 AM
Depends on what language you're familiar with. I think it's a 3/10 for hardness, if that high.

~Camo

code841
11-08-2009, 09:06 AM
The problem would be accuracy, I mean, the first result is not always going to be the best..

JPHamlett
11-08-2009, 03:21 PM
if its a song itll be accurate most of the time

Baked0420
11-08-2009, 04:03 PM
wouldn't be too hard, with scar you could use ReadLn(Question);, and then use one of the codes to open a webpage, I forget which I used, then have it type the names inputted, I'd put them into an array, but then do a text search for the name of the song, click it and get the url somehow, not exactly sure of that but I bet I could figure that out pretty easily. But yea, you should probably be able to do it easy, and very easily if you made it so it'd only work with your resolution, but that makes it a very personal script lol, wouldn't really be able to be used by other people then unless they have the same resolution and stuff.

You should try making it and post it when you're done. I'd like to see what language you chose and how you made it.

JPHamlett
11-08-2009, 04:22 PM
im thinking C++

Baked0420
11-08-2009, 04:34 PM
I don't know a whole lot of C++ it's my principles of computer science class, so we're learning kinda slow, but I'm learning a lot of java in the advanced placement comp science class. But I'd still like to see the coding when you're done, maybe I can learn some from it :). good luck

Zyt3x
11-08-2009, 08:23 PM
In scar it would be extremely easy..
do something like


var S : String;

S := GetPage('');
S := Between();
Result := S; and voilĂ 

JPHamlett
11-08-2009, 09:34 PM
In scar it would be extremely easy..
do something like


var S : String;

S := GetPage('');
S := Between();
Result := S; and voilĂ 


it has to copy the URL and the paste it in a totaly diffrent window so scar cant do it i believe

Naike
11-08-2009, 10:35 PM
To answer your question: Nothing is impossible.

rogeruk
11-08-2009, 11:09 PM
On scale of hardness 0/10 0 being easiest.

VB it. Insert a list of songs then create a simple webbrowser control to do all the work and simply export its links to a txt file wolla.

JPHamlett
11-09-2009, 12:34 AM
can u do that cause i have no VB exp ill rep u if u want but if your busy i understand

YoHoJo
11-09-2009, 01:07 AM
[unrelated?]http://lifehacker.com/5399494/tuberadio-turns-youtube-into-jukebox?autoplay=true[/unrelated?]

JPHamlett
11-09-2009, 01:31 AM
[unrelated?]http://lifehacker.com/5399494/tuberadio-turns-youtube-into-jukebox?autoplay=true[/unrelated?]

i put it on my ipod so idt that will work

YoHoJo
11-09-2009, 01:57 AM
http://www.redkawa.com/
:D DL youtube vids, convert, put them on iPod
(lol idk wtf this thread is even about!)

rogeruk
11-09-2009, 05:33 AM
Yea whats the use maybe theres an alternative out there already.

JPHamlett
11-09-2009, 12:12 PM
well i just wnat a program that i can input song names and then it will go an get the url and save it in a text document cause i hate having to that by myself its to time consuming

so in a nutshell

it should

take the inputed song names
go to youtube
type it in to search
click the first link
get the url
paste in in a text document
repeat

caused
11-09-2009, 12:21 PM
well i just wnat a program that i can input song names and then it will go an get the url and save it in a text document cause i hate having to that by myself its to time consuming

so in a nutshell

it should

take the inputed song names
go to youtube
type it in to search
click the first link
get the url
paste in in a text document
repeat

I could help you make one in delphi.. It's simple, really ;).

I'd use an Idhttp object to use the utube search, than some string functions to filter the first video-link.
+ Some File Operations, and you're done. It's simple :)
(And of course could run in the background)

~caused

rogeruk
11-09-2009, 05:56 PM
Well i spent some of my free time (dont get alot of it..)

Here ya go.
Attached in an RAR File.

Basically enter as many titles as you want and it will run through the list picking out the FIRST link that youtube provides. It doesnt use a web browser or anything so it is very fast.

Have fun

//Virus scan results here..
http://virusscan.jotti.org/en-gb/scanresult/222415b45be53c8aaeb8e0e03fd48fb7f59faf1d

100% Clean.

JPHamlett
11-09-2009, 10:52 PM
Well i spent some of my free time (dont get alot of it..)

Here ya go.
Attached in an RAR File.

Basically enter as many titles as you want and it will run through the list picking out the FIRST link that youtube provides. It doesnt use a web browser or anything so it is very fast.

Have fun

//Virus scan results here..
http://virusscan.jotti.org/en-gb/scanresult/222415b45be53c8aaeb8e0e03fd48fb7f59faf1d

100% Clean.


can i see th source

its not cause i think it bad i jsut wanna see how u did it

rogeruk
11-10-2009, 11:14 PM
Check PM

[-jesus-]
11-12-2009, 09:00 PM
I just made one now in VB 2008:

http://content.screencast.com/users/jesusspork/folders/Jing/media/812c703c-0e64-4805-b583-0cb1e1e1fe4a/2009-11-12_1600.png



Imports System.Net

Public Class Form1

Private Sub btnSearch_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSearch.Click
If TextSearchBox.Text = Nothing Then
MsgBox("Type something for the program to search on YouTube!")
Exit Sub
End If
BackgroundWorker1.RunWorkerAsync()
End Sub

Private Sub BackgroundWorker1_DoWork(ByVal sender As System.Object, ByVal e As System.ComponentModel.DoWorkEventArgs) Handles BackgroundWorker1.DoWork
CheckForIllegalCrossThreadCalls = False
Dim Client As New WebClient
Dim result = Client.DownloadString("http://www.youtube.com/results?search_query=" & TextSearchBox.Text & "&search_type=&aq=f")
Dim splitarray() As String = System.Text.RegularExpressions.Regex.Split(result, "<a id=""video-url-")
RichTextBox1.Text = "http://www.youtube.com/watch?v=" & splitarray(1).Split("""")(0)
End Sub
End Class

rogeruk
11-12-2009, 11:07 PM
Already done. And he wanted it to be multiple songs.

[-jesus-]
11-12-2009, 11:51 PM
Already done. And he wanted it to be multiple songs.

k :p

http://content.screencast.com/users/jesusspork/folders/Jing/media/758ff940-2d7b-4a4e-9dc1-76f7a9482fb9/2009-11-12_1851.png
source/exe attached