Das ist so wenn eine gleichnamige exe-Datei schonmal da war und die dann halt ein anderes Icon hatte bzw das Standart-Icon
Änder mal den Dateinamen von deinem Taschenrechner
EDIT:
Als Lösung war bei mir immer warten angesagt...
Das ist so wenn eine gleichnamige exe-Datei schonmal da war und die dann halt ein anderes Icon hatte bzw das Standart-Icon
Änder mal den Dateinamen von deinem Taschenrechner
EDIT:
Als Lösung war bei mir immer warten angesagt...
iso entpacken und mit WinToFlash draufkopieren (Hatte das gleiche problem mit dem microsoft tool)
So hats dann funktioniert
nicht nur dein square7 server
also tröste dich meiner is auch down
(HAHA Bringt dir viel, ich weiß xD)
mit dem code von youtube fängst du nicht arg viel an weil da noch ein haufen anderer informationen drinsteht
aber du kannst auch "einfach" (xD) nur an den Videolink kommen:
#include <Inet.au3>
#include <String.au3>
$LNK = "http://www.youtube.com/watch?v=..........."
$Source= _INETGETSOURCE($LNK)
;$Title = _stringbetween($Source,"'VIDEO_TITLE': '","',")
$ID = _stringbetween($Source,"'VIDEO_ID': '","',")
$T = _stringbetween($Source,'"t": "','",')
$DownloadLink = 'http://www.youtube.com/get_video?fmt=18&video_id=' & $ID[0] & '&t=' & $T[0]
so sollte es gehen
Ok nun ist meine Punktzahl auch "etwas" Höher xD
Ich hab gerade 24720 Punkte
was ist das für ein sinn wenn im spiel die doppelte punktzahl angezeigt wird wie man nacher hat?
kann es irgendwie sein das der punkte wieder abzieht?
ich hatte grad über 5600 punkte und raus kamen nur 2800
???
EDIT:
1. Fehler gefunden:
in zeile 232 muss das *2 nach $score weg
2. wo isn grad der rekord? - ich hab 17280 punkte
Hallo Autoit Community,
Ich präsentiere hier meinen YouTube Video Downloader + Converter
Zum Convertieren wird ffmpeg.exe verwendet.
Hier der Code:
#include <GuiConstantsEx.au3>
#include <ProgressConstants.au3>
#include <ComboConstants.au3>
#include <StaticConstants.au3>
#include <EditConstants.au3>
#include <Inet.au3>
#include <String.au3>
Opt("TrayMenuMode", 1)
Global $sSource
$HD = False
FileInstall(@scriptdir & "\ffmpeg.exe", @TempDir & "\ffmpeg.exe")
[/autoit] [autoit][/autoit] [autoit]GUICreate("YouTube Video-Downloader", 365, 255)
[/autoit] [autoit][/autoit] [autoit]$DWNINPUT = Guictrlcreateinput("", 10, 23, 345, 18, BitOR($ES_AUTOHSCROLL,$ES_READONLY))
guictrlsetbkcolor(-1,0xffffff)
GUICtrlCreateLabel("YouTube Link:", 10, 6.5, 268, 15)
$START = GUICtrlCreateButton("&Start", 205, 145 , 150, 25, 0)
GUICtrlSetState(-1, $GUI_DISABLE)
$ABB = GUICtrlCreateButton("&Abbrechen", 205, 180 , 150, 25, 0)
GUICtrlSetState(-1, $GUI_DISABLE)
$EINFG = GUICtrlCreateButton("Link Einfügen", 10, 47.5, 150, 25, 0)
$ITDEL = GUICtrlCreateButton("Link Löschen", 205, 47.5, 150, 25, 0)
GUICtrlSetState(-1, $GUI_DISABLE)
$change = guictrlcreatebutton("Speicherort ändern", 205 ,110,150,25)
guictrlcreatelabel("Speicherort:",12.5,82.5)
if @OSVersion = "WIN_VISTA" or "WIN_7" Then
$saveplace=guictrlcreateinput("C:\Users\"&@username&"\Videos", 80, 80, 275, 21, BitOR($ES_AUTOHSCROLL,$ES_READONLY))
elseif @osversion = "WIN_XP" Then
$saveplace=guictrlcreateinput(@MyDocumentsDir&"\Eigene Videos", 112, 80, 240, 21, BitOR($ES_AUTOHSCROLL,$ES_READONLY))
Else
guidelete()
msgbox(16,"Warnung","Nicht unterstütztes Betriebssystem: "&@osversion&@crlf&"YouTube Video-Downloader unterstützt nur"&@crlf&"Windows XP , Vista und 7")
exit
endif
$AUDRADIO = GUICtrlCreateRadio("Audio", 12, 110 )
$AUDCOMBO = GUICtrlCreateCombo(".mp3", 80, 110 , 100,Default,$CBS_DROPDOWNLIST)
GUICtrlSetState($AUDCOMBO, $GUI_DISABLE)
GUICtrlSetFont(-1, 10)
$VIDRADIO = GUICtrlCreateRadio("Video", 12, 145)
GUICtrlSetState(-1, $GUI_CHECKED)
$VIDCOMBO = GUICtrlCreateCombo(".wmv", 80, 145, 100, Default,$CBS_DROPDOWNLIST)
GUICtrlSetFont(-1, 10)
GUICtrlSetData(-1, ".avi|.mpg|.mp4")
$HDVIDRADIO = GUICtrlCreateRadio("HD Video", 12, 180)
$HDVIDCOMBO = GUICtrlCreateCombo(".mp4", 80, 180, 100, Default,$CBS_DROPDOWNLIST)
GUICtrlSetState($HDVIDCOMBO, $GUI_DISABLE)
GUICtrlSetState($HDVIDRADIO, $GUI_DISABLE)
GUICtrlSetFont(-1, 10)
$progress=GUICtrlCreateProgress(10, 211, 345, 16)
$proggi=GUICtrlCreateProgress(10, 230, 345, 16)
$label1=GUICtrlCreateLabel("Bereit",10, 211, 345, 16,BitOR($SS_CENTER,$SS_CENTERIMAGE))
GUICtrlSetBkColor(-1,-2)
guictrlsetfont(-1,9)
$label2=GUICtrlCreateLabel("zum Download",10, 230, 345, 16,BitOR($SS_CENTER,$SS_CENTERIMAGE))
GUICtrlSetBkColor(-1,-2)
guictrlsetfont(-1,9)
GUISetState(@SW_SHOW)
While 1
$NMSG = GUIGetMsg()
Switch $NMSG
Case $EINFG
$LNK = ClipGet()
If StringLeft($LNK, 31) = "http://www.youtube.com/watch?v=" Then
GUICtrlSetData($DWNINPUT, $LNK)
$Source= _INETGETSOURCE($LNK)
if Stringinstr($Source,"37%7Chttp") then
TrayTip("Video in HD verfügbar","Dieses Video ist in Full-HD Qualität verfügbar",5,1)
GUICtrlSetState($HDVIDRADIO, $GUI_ENABLE)
elseif StringInStr($Source,"22%7Chttp") then
TrayTip("Video in HD verfügbar","Dieses Video ist in HD-Ready Qualität verfügbar",5,1)
GUICtrlSetState($HDVIDRADIO, $GUI_ENABLE)
EndIf
if StringInStr($Source,"18%7Chttp") and Guictrlread($VIDRADIO) = 1 then
guictrlsetdata($vidcombo,".mp4")
TrayTip("Automatische Einstellung","Um die Beste Qualität zu erreichen wurde das Format auf .mp4 gestellt."&@crlf&"Wenn sie das nicht möchten, oder das .mp4 Format nicht abspielen können, wählen sie bitte ein anderes Format",5,1)
EndIf
GUICtrlsetdata($DWNINPUT,$LNK)
GUICtrlSetState($itdel, $GUI_Enable)
GUICtrlSetState($START, $GUI_ENABLE)
Else
msgbox(16,"Fehler","Kein gültiger YouTube Link")
endif
case $ITDEL
guictrlsetdata($DWNINPUT,"")
GUICtrlSetState($start,$GUI_DISABLE)
GUICtrlSetState($itdel, $GUI_Disable)
$LNK = ""
case $change
$where = FileSelectFolder("Speicherort für die Videos auswählen:", "", 7)
if @error Then
elseif $where = "Netzwerk" then
elseif $where = "Papierkorb" then
elseif $where = "Arbeitsplatz" then
elseif $where = "Systemsteuerung" then
else
guictrlsetdata($saveplace,$where)
endif
Case $GUI_EVENT_CLOSE
FileDelete(@TempDir & "\ffmpeg.exe")
Exit
Case $AUDRADIO
GUICtrlSetState($VIDCOMBO, $GUI_DISABLE)
GUICtrlSetState($HDVIDCOMBO, $GUI_DISABLE)
GUICtrlSetState($AUDCOMBO, $GUI_ENABLE)
Case $VIDRADIO
GUICtrlSetState($AUDCOMBO, $GUI_DISABLE)
GUICtrlSetState($VIDCOMBO, $GUI_ENABLE)
GUICtrlSetState($HDVIDCOMBO, $GUI_DISABLE)
if StringInStr($sSource,"18%7Chttp") then
guictrlsetdata($vidcombo,".mp4")
TrayTip("Automatische Einstellung","Um die Beste Qualität zu erreichen wurde das Format auf .mp4 gestellt."&@crlf&"Wenn sie das nicht möchten, oder das .mp4 Format nicht abspielen können, wählen sie bitte ein anderes Format",5,1)
EndIf
Case $HDVIDRADIO
GUICtrlSetState($AUDCOMBO, $GUI_DISABLE)
GUICtrlSetState($VIDCOMBO, $GUI_DISABLE)
GUICtrlSetState($HDVIDCOMBO, $GUI_ENABLE)
Case $START
GUICtrlSetState($EINFG, $GUI_DISABLE)
GUICtrlSetState($ITDEL, $GUI_DISABLE)
If GUICtrlRead($VIDRADIO) = 1 Then
$FORMAT = GUICtrlRead($VIDCOMBO)
ElseIf GUICtrlRead($AUDRADIO) = 1 Then
$FORMAT = GUICtrlRead($AUDCOMBO)
ElseIf GUICtrlRead($HDVIDRADIO) = 1 Then
$FORMAT = GUICtrlRead($HDVIDCOMBO)
$HD = True
EndIf
If $FORMAT = ".mp3" Then
$FORMATNAME = "Musik"
ElseIf $FORMAT = ".wmv" Or ".avi" Or ".mpg" Or ".mp4" Then
$FORMATNAME = "Video"
EndIf
$Title = _stringbetween($Source,'<meta name="title" content="','">')
$videoname = _REPLACE_SPECIAL_CHARS($Title[0])
$ID = _stringbetween($Source,"'VIDEO_ID': '","',")
$T = _stringbetween($Source,'"t": "','",')
if $formatname = "Video" Then
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]if $HD = True then
if not StringInStr($Source,"37%7Chttp") Then
$sDownloadLink = 'http://www.youtube.com/get_video?fmt=22&video_id=' & $ID[0] & '&t=' & $T[0]
$endung = ".mp4"
Else
$sDownloadLink = 'http://www.youtube.com/get_video?fmt=37&video_id=' & $ID[0] & '&t=' & $T[0]
$endung = ".mp4"
EndIf
ElseIf $HD = False then
if stringinstr($Source,"37%7Chttp") then
$sDownloadLink = 'http://www.youtube.com/get_video?fmt=18&video_id=' & $D[0] & '&t=' & $T[0]
$endung = ".mp4"
Else
if not StringInStr($Source,"35%7Chttp") Then
if not stringinstr($Source,"18%7Chttp") Then
if not stringinstr($Source,"34%7Chttp") Then
$sDownloadLink = 'http://www.youtube.com/get_video?fmt=5&video_id=' & $ID[0] & '&t=' & $T[0]
$endung = ".flv"
EndIf
$sDownloadLink = 'http://www.youtube.com/get_video?fmt=34&video_id=' & $ID[0] & '&t=' & $T[0]
$endung = ".flv"
EndIf
$sDownloadLink = 'http://www.youtube.com/get_video?fmt=18&video_id=' & $ID[0] & '&t=' & $T[0]
$endung = ".mp4"
Elseif StringInStr($Source,"35%7Chttp") Then
$sDownloadLink = 'http://www.youtube.com/get_video?fmt=35&video_id=' & $ID[0] & '&t=' & $T[0]
$endung = ".flv"
EndIf
EndIf
EndIf
Elseif $formatname = "Musik" then
if not stringinstr($Source,"18%7Chttp") Then
if not stringinstr($Source,"34%7Chttp") Then
$sDownloadLink = 'http://www.youtube.com/get_video?fmt=5&video_id=' & $ID[0] & '&t=' & $T[0]
$endung = ".flv"
EndIf
$sDownloadLink = 'http://www.youtube.com/get_video?fmt=34&video_id=' & $ID[0] & '&t=' & $T[0]
$endung = ".flv"
EndIf
$sDownloadLink = 'http://www.youtube.com/get_video?fmt=18&video_id=' & $ID[0] & '&t=' & $T[0]
$endung = ".mp4"
EndIf
GUICtrlsetstate($START,$GUI_DISABLE)
GUICtrlSetState($ABB,$GUI_ENABLE)
$SAVE = @TempDir&"\"&$videoname&$endung
$punk= guictrlread($saveplace)&"\"&$videoname
guictrlsetdata($label1,"Download 0%")
guictrlsetdata($label2,"Gesamt 0%")
_DOWNLOAD($SAVE,$sDownloadLink)
sleep(500)
_CONVERT($SAVE, $punk, $PROGRESS)
sleep(500)
filedelete($SAVE)
$HD = False
Guictrlsetstate($HDVIDRADIO,$GUI_DISABLE)
Guictrlsetstate($HDVIDCOMBO,$GUI_DISABLE)
Guictrlsetstate($ABB,$GUI_DISABLE)
MsgBox(32, "YouTube Loader", "Download abgeschlossen")
guictrlsetdata($proggi,0)
guictrlsetdata($progress,0)
guictrlsetdata($label1, "Bereit")
guictrlsetdata($label2, "zum Download")
guictrlsetdata($DWNINPUT,"")
GUICtrlSetState($EINFG, $GUI_ENABLE)
EndSwitch
WEnd
Func _DOWNLOAD($PUNKT,$SITE)
$ORISIZE = InetGetSize($SITE)
$ihdl=InetGet($site, $punkt, 1, 1)
Do
$MSG = GUIGetMsg()
If $MSG = $ABB Then
InetGet("abort")
FileDelete($PUNKT)
$HD = False
guictrlsetdata($label1, "Bereit")
guictrlsetdata($label2, "zum Download")
guictrlsetdata($proggi,0)
guictrlsetdata($progress,0)
guictrlsetdata($DWNINPUT,"")
GUICtrlSetState($EINFG, $GUI_ENABLE)
exitloop
ElseIf $MSG = $GUI_EVENT_CLOSE Then
InetGet("abort")
FileDelete($PUNKT)
FileDelete(@TempDir & "\ffmpeg.exe")
Exit
EndIf
$SIZE1=InetGetInfo($ihdl, 0)
$PROZENT = (100 * $SIZE1) / $ORISIZE
guictrlsetdata($progress,Floor($PROZENT))
guictrlsetdata($proggi,Floor($PROZENT/4*3))
guictrlsetdata($label1, "Download "&Floor($PROZENT)&"%")
guictrlsetdata($label2, "Gesamt "&Floor($PROZENT/4*3)&"%")
sleep(100)
Until $SIZE1 = $ORISIZE
EndFunc
Func _CONVERT($INFILE, $outdir, $PROG)
$sFFmpeg = ""
$ersatz1 = @tempdir&"\"&_REPLACE_SPECIAL_CHARS2($videoname)&$endung
filemove($infile,$ersatz1)
If GUICtrlRead($VIDRADIO) = 1 Then
$ersatz2 = guictrlread($saveplace)&"\"&_REPLACE_SPECIAL_CHARS2($videoname)& GUICtrlRead($VIDCOMBO)
if GUICtrlRead($VIDCOMBO) = ".mp4" and $endung = ".mp4" then
$hFFmpeg=Run(@TempDir &"\ffmpeg.exe",@TempDir ,@SW_HIDE,0x4)
Filemove($save,$outdir & GUICtrlRead($VIDCOMBO))
Else
if GUICtrlRead($VIDCOMBO) = ".mp4" Then
$hFFmpeg=Run(@TempDir &"\ffmpeg.exe -i " & $ersatz1 & " -acodec libfaac -ab 128k -ac 2 -vcodec libx264 -y " & $ersatz2 ,@TempDir ,@SW_HIDE,0x4)
Elseif GUICtrlRead($VIDCOMBO) = ".mpg" Then
$hFFmpeg=Run(@TempDir &"\ffmpeg.exe -i " & $ersatz1 & " -acodec libmp3lame -ab 128k -ac 2 -y " & $ersatz2 ,@TempDir,@SW_HIDE,0x4)
Elseif GUICtrlRead($VIDCOMBO) = ".avi" Then
$hFFmpeg=Run(@TempDir &"\ffmpeg.exe -i " & $ersatz1 & " -acodec libmp3lame -ab 128k -ac 2 -y " & $ersatz2 ,@TempDir,@SW_HIDE,0x4)
Elseif GUICtrlRead($VIDCOMBO) = ".wmv" Then
$hFFmpeg=Run(@TempDir &"\ffmpeg.exe -i " & $ersatz1 & " -acodec wmav2 -ab 128k -ac 2 -vcodec msmpeg4v2 -y " & $ersatz2 ,@TempDir ,@SW_HIDE,0x4)
EndIf
EndIf
ElseIf GUICtrlRead($AUDRADIO) = 1 Then
$ersatz2 = guictrlread($saveplace)&"\"&_REPLACE_SPECIAL_CHARS2($videoname)&GUICtrlRead($AUDCOMBO)
$hFFmpeg=Run(@TempDir &"\ffmpeg.exe -i " & $ersatz1& " -acodec libmp3lame -ab 128k -ac 2 -y " & $ersatz2 ,@TempDir ,@SW_HIDE,0x4)
ElseIf GUICtrlRead($HDVIDRADIO) = 1 Then
$ersatz2 = guictrlread($saveplace)&"\"&_REPLACE_SPECIAL_CHARS2($videoname)& GUICtrlRead($HDVIDCOMBO)
$hFFmpeg=Run(@TempDir &"\ffmpeg.exe",@TempDir ,@SW_HIDE,0x4)
Filemove($save,$outdir & GUICtrlRead($HDVIDCOMBO))
EndIf
guictrlsetdata($progress,0)
guictrlsetdata($label1,"Konvertierung 0%")
While 1
$sFFmpeg &= StderrRead($hFFmpeg)
If @error Or StringInStr($sFFmpeg,"Duration") Then ExitLoop
WEnd
$sFFmpeg = StringLeft(StringTrimLeft($sFFmpeg, StringInStr($sFFmpeg, "Duration:") + 9),
$iTicks = _TimeToTicks(StringLeft($sFFmpeg, 2), StringMid($sFFmpeg, 4, 2), StringMid($sFFmpeg, 7, 2))
While 1
$sFFmpeg = StderrRead($hFFmpeg)
If @error Then ExitLoop
If StringInStr($sFFmpeg,"time=") Then
$sFFmpeg=StringTrimLeft($sFFmpeg, StringInStr($sFFmpeg, "time=") + 4)
$prozent=(StringLeft($sFFmpeg, StringInStr($sFFmpeg, ".")-1) *100000)/$iTicks
GUICtrlSetData($progress,Floor($prozent))
guictrlsetdata($proggi,Floor($prozent/4+75))
guictrlsetdata($label1, "Konvertierung "&Floor($PROZENT)&"%")
guictrlsetdata($label2, "Gesamt "&Floor($PROZENT/4)+75&"%")
EndIf
WEnd
filemove($ersatz2,guictrlread($saveplace)&"\"&$videoname&StringRight($ersatz2,4))
EndFunc
Func _REPLACE_SPECIAL_CHARS($STR)
$STR = StringReplace($STR, "ä", "ä")
$STR = StringReplace($STR, "Ä", "Ä")
$STR = StringReplace($STR, "ö", "ö")
$STR = StringReplace($STR, "Ö", "Ö")
$STR = StringReplace($STR, "ü", "ü")
$STR = StringReplace($STR, "Ãœ", "Ü")
$STR = StringReplace($STR, "Ãx", "ß")
$STR = StringReplace($STR, "ß", "ß")
$STR = StringReplace($STR, "ç", "ç")
$STR = StringReplace($STR, "Ç", "Ç")
$STR = StringReplace($STR, "/" , " ")
$STR = StringReplace($STR, "\" , " ")
$STR = StringReplace($STR, ":" , " ")
$STR = StringReplace($STR, "*" , " ")
$STR = StringReplace($STR, "?" , " ")
$STR = StringReplace($STR, "!" , " ")
$STR = StringReplace($STR, '"' , " ")
$STR = StringReplace($STR, "<" , " ")
$STR = StringReplace($STR, ">" , " ")
$STR = StringReplace($STR, "|" , " ")
$STR = StringReplace($STR, "%3D","=")
$STR = StringReplace($STR, "%26","&")
$STR = StringReplace($STR, "%25","%")
$STR = StringStripWS($STR, 7)
Return $STR
EndFunc
Func _REPLACE_SPECIAL_CHARS2($srt)
$srt = StringReplace($srt, " ", "_")
Return $srt
EndFunc
Und hier der Download der ffmpeg.exe:
http://file.square7.ch/ffmpeg.exe
LG Automan
Wieso funktioniert das script bei mir nicht?
Der zeigt nur den Trayicon an macht dann aber nichts mehr
Ich hab Windows7 32 bit kann es daran liegen?
LG Automan
EDIT:
OK jetzt zeigt er das fenster an nachdem ich die guistyles entfernt habe
aber der loader funktioniert nicht wirklich bei mir
du musst auch noch was zwischen die klammern setzen
such doch einfach mal in der hilfe danach
Indem du in ner schleife nach dem fenster suchst und auf ok klickst mit controlclick()
aba mehr will und darf ich wahrscheinlich auch gar nicht helfen
trotzdem kann man mit send("{entf}") nicht die Entfernen-Taste betätigen
EDIT:
Und mit nem code der nur die entfernen taste sendet kann ich nun wirklich nich viel anfangen
wenn es gut wäre müsste er noch bei den löschabfragen auf ok klicken...
Erstens läuft des so nicht und zweitens, was soll der müll?
Des bringt doch mal gar nichts!
is nich "@OSArch" dafür das richtige makro?
EDIT:
weil bei meinem Windows 7 32bit kommt bei "@CPUArch" "x64" raus...
oder einfach alle ordner mit autoit exe files bei avira überspringen xD
Is ja gut jetzt
Des klang iwie dämlich ich weiß
Ich habs aba nich so gemeint als wäre es doof
Und Ja ich find des fürs erste auch nich schlecht
Aber ich finds n bisschen umständlich mit den Tasten
Iwie is des mit an den Bildschirmrand ziehen Praktischer
Ich weiß doch
Damit kann man sich ja auch selbst herausfordern wenn man was nachscripten will
Mach ich doch auch manchmal
Is ja ganz nett aber
des tool gibt es schon.
Aes heißt Aero Snap und lässt sich HIER runter laden
Auch für XP und Vista User
Kannst ja meinen Codeschnippsel verwenden, weil des is auch des einzige was da sonst nicht funzt
Sähe dann so aus:
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <ProgressConstants.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <INet.au3>
;Test-URL: [media]http://www.youtube.com/watch?v=nGWrkq2Ales[/media]
If (Not FileExists(@ScriptDir & "\Videos\")) Then DirCreate(@ScriptDir & "\Videos\")
[/autoit][autoit][/autoit][autoit];Gui Erstellen
$hWin1 = GUICreate("iTube v1.0", 319, 93, 192, 124)
$hLbl1 = GUICtrlCreateLabel("YouTube URL hier Eingeben :", 8, 8, 147, 17)
$hInp1 = GUICtrlCreateInput("", 160, 8, 153, 21, BitOR($ES_RIGHT, $ES_AUTOHSCROLL))
$hPrg1 = GUICtrlCreateProgress(8, 32, 305, 17)
$hBtn1 = GUICtrlCreateButton("Download", 8, 56, 75, 25, $WS_GROUP)
$hPrg2 = GUICtrlCreateProgress(88, 60, 225, 17)
GUISetState(@SW_SHOW) ;GUI Anzeigen
[/autoit][autoit][/autoit][autoit]While 1
$nMsg = GUIGetMsg() ;Controls Abfragen
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $hBtn1
If GUICtrlRead($hInp1) = "" Then ContinueLoop
_Download(GUICtrlRead($hInp1))
EndSwitch
WEnd
Func _Download($sURL, $bHD = False)
Local $sSource, $sTitle, $sID, $sDownloadLink, $sSWFArgs, $sSWFID, $iSize, $iCurrent, $iProzent
$sSource = _INetGetSource($sURL)
$sSource = StringStripCR($sSource)
$sSource = StringReplace($sSource, @LF, '')
$sTitle = StringRegExp($sSource, "'VIDEO_TITLE': '(.*?)'", 1, 1) ;Titel Auslesen
If IsArray($sTitle) Then $sTitle = $sTitle[0] ;Anpassen
GUICtrlSetData($hPrg2, 25)
Sleep(500)
$sID = StringRegExp($sSource, "'VIDEO_ID': '(.*?)'", 1, 1) ;ID Auslesen
If IsArray($sID) Then $sID = $sID[0] ;Anpassen
GUICtrlSetData($hPrg2, 50)
Sleep(500)
;SWF ARG - Bereich auslesen
$sSWFArgs = StringRegExp($sSource, 'SWF_ARGS(.*?)}', 1, 1)
If IsArray($sSWFArgs) Then $sSource = $sSWFArgs[0]
GUICtrlSetData($hPrg2, 75)
Sleep(500)
;Code ID aus dem SWF ARG Bereich auslesen
$sSWFID = StringRegExp($sSource, '"t": "(.*?)",', 1, 1)
If IsArray($sSWFID) Then $sSWFID = $sSWFID[0]
GUICtrlSetData($hPrg2, 100)
Sleep(500)
GUICtrlSetData($hPrg2, 0)
$sDownloadLink = 'http://www.youtube.com/get_video?fmt=18&video_id=' & $sID & '&t=' & $sSWFID
$ORISIZE = InetGetSize($sDownloadLink)
$ihdl=InetGet($sDownloadLink, @ScriptDir & "\Videos\" & StringRegExpReplace($sTitle, "((?<!.)([a-zA-Z]\:\\)(?!\s)(([\w-+.]*" & _
"((?<!\s)(\s{1})(?!\\)|(?<!\\)(\\{1})(?!\s))*)*)(\\?)(?!.))", "") & ".mp4", 1, 1)
Do
$SIZE1=InetGetInfo($ihdl, 0)
$PROZENT = (100 * $SIZE1) / $ORISIZE
GUICtrlSetData($hPrg1, $Prozent)
Until $SIZE1 = $ORISIZE
MsgBox(64, "iTube v1.0", $sTitle & " erfolgreich Heruntergeladen")
Exit
EndFunc ;==>_Download
Also erst mal zum Rechtlichen:
YouTube verbietet in seiner AGB zwar den Download von Videos, aber dieser muss man ja nur zustimmen wenn man einen YouTube Account hat.
Dann zum Programm:
Ich habe auch so einen YouTube loader mal geschrieben, und benutze zum Umwandeln FFMPEG.exe
Damit kann ich dann die videos auch in das mp3 format konvertieren.
Und hier der download-teil für alle die das neue autoit haben:
[autoit]
$ORISIZE = InetGetSize($sDownloadLink)
$ihdl=InetGet($sDownloadLink, @ScriptDir & "\Videos\" & StringRegExpReplace($sTitle, "((?<!.)([a-zA-Z]\:\\)(?!\s)(([\w-+.]*" & _
"((?<!\s)(\s{1})(?!\\)|(?<!\\)(\\{1})(?!\s))*)*)(\\?)(?!.))", "") & ".mp4", 1, 1)
Do
$SIZE1=InetGetInfo($ihdl, 0)
$PROZENT = (100 * $SIZE1) / $ORISIZE
GUICtrlSetData($hPrg1, $Prozent)
Until $SIZE1 = $ORISIZE
MsgBox(64, "iTube v1.0", $sTitle & " erfolgreich Heruntergeladen")
Exit
einfach den teil der unter :$sDownloadLink = 'http://www.youtube.com/get_video?fmt=18&video_id=' & $sID & '&t=' & $sSWFID
durch meinen Code ersetzen