Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * Copyright (c) 2012 [iPs]TeaM
- * Bruno da Silva (email@brunodasilva.com)
- * Ver vídeos em Delphi! Pesquisa dinâmica no youtube. Precisa da função URLEncode !!
- *
- * www.brunodasilva.com
- * www.ips-team.forumeiros.com
- */
- procedure TForm1.Button1Click(Sender: TObject);
- var
- iCalc : integer;
- szData : string;
- szFile : string;
- begin
- szData := IdHTTP1.Get('http://www.youtube.com/results?search_query=trailer%20' + URLEncode(edit1.text));
- iCalc := pos('" data-context-item-id="', szData) + 24;
- ShowMessage('Encontrei ' + IntToStr(iCalc));
- While (szData[iCalc] <> '"') Do
- Begin
- szFile := szFile + szData[iCalc];
- iCalc := iCalc + 1;
- End;
- ShowMessage('Encontrado ' + szFile);
- WebBrowser1.Navigate('http://youtube.googleapis.com/v/' + szFile) ;
- end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement