Hi alle Autoit Coder ich bin im Netz auf einen Youtube downloader Code gestoßen , der folgendermaßen aussieht ...
C
#include <GUIConstants.au3>
#include <inet.au3>
GUICreate("You Tube Video-Downloader", 273, 105, 193, 115, -1)
$DwnInput = GUICtrlCreateInput("http://www.youtube.com/watch?v=6DEh0eSpNvY", 8, 24, 257, 21)
GUICtrlCreateLabel("www.youtube.com Download Link:", 8, 8, 268, 15)
$start = GUICtrlCreateButton("&Start", 8, 48, 128, 25, 0)
$Progress = GUICtrlCreateProgress(8, 80, 257, 16)
$abb = GUICtrlCreateButton("A&bbruch", 137, 48, 128, 25, 0)
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $start
GUICtrlSetState($start,$GUI_DISABLE)
$dwnlink = GUICtrlRead($DwnInput)
$sCode=_INetGetSource ($dwnlink)
$s_t=StringRegExp($sCode, "&t=(.*?)&", 3)
$s_v=stringmid($dwnlink,stringinstr($dwnlink,"v=")+2)
$save = FileSaveDialog("Speichere SWF","","Flash(*.swf)",-1,$s_v)
If StringRight($save,4) <> ".swf" Then $save&=".swf"
_Download("http://youtube.com/get_video?video_id=" & $s_v & "&t=" & $s_t[0], & $save, & $Progress)
GUIDelete()
MsgBox(0,"","Fertig!")
Exit
EndSwitch
WEnd
Func _Download($site,$punkt,$prog=0)
$orisize = InetGetSize($site)
InetGet($site,$punkt,1,1)
If $prog = 0 Then ProgressOn("Download","")
Do
$msg = GUIGetMsg()
If $msg = $abb Then
If MsgBox(4,"","Abbruch?") = 6 Then Exit
EndIf
$size1 = FileGetSize($punkt)
$MBsize1 = FileGetSize($punkt)
$inetget = @InetGetBytesRead
$Prozent = (100 * $inetget ) / $orisize
$decimalplace = Round ($Prozent)
$decimalplaceMBsize1 = Round (@InetGetBytesRead / 1024)
If $prog = 0 Then
ProgressSet ($Prozent, $decimalplace & "% " & "(" & $decimalplaceMBsize1 & ") Kb sind bereits gedownloadet.")
Else
GUICtrlSetData($prog,$Prozent)
EndIf
Until @InetGetActive = 0
If $prog = 0 Then ProgressOff ()
Return $punkt
EndFunc
Alles anzeigen
Das klappt ja auch EIGENTLICH alles bis dieser error kommt
Des weiteren möchte ich , wenn ich die datei gedownloadet habe , es in mp3 umwandeln
Das soll so klappen
Zitat von Autoit.delad dir noch ffmpeg runter, dann kannst es auch gleich umwandeln lassen, und bevor es zu problemen kommt beim benutzen, die namen dürfen beim übergeben keine leerzeichen beinhalten
Code
set /p Name=Type in the name of the flv(without .flv):
ffmpeg -i %Name%.flv -ar 44100 -ac 2 -ab 256k %Name%.mp3
So wie soll das gehen und wie kann ich den error beheben , weil dann könnte ich meinen downloader fertig stellen ^^
lg Fuyo