Hallo.
Das myvideo.de-Script geht nicht mehr.
Was ist falsch?
Spoiler anzeigen
#include<File.au3>
#include<Inet.au3>
#include<GUIConstantsEx.au3>
#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_icon=..\..\..\Minium Doc XP Icon 03.ico
#AutoIt3Wrapper_UseUpx=n
#AutoIt3Wrapper_UseAnsi=y
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
PluginOpen("pthreadGC2.dll")
[/autoit] [autoit][/autoit] [autoit]GUICreate("My Video.de Downloader", 273, 105, 193, 115, -1, BitOR($WS_EX_TOOLWINDOW,$WS_EX_WINDOWEDGE))
DIM $DwnInput = GUICtrlCreateInput("3067224", 8, 24, 257, 21)
GUICtrlCreateLabel("www.myvideo.de Video-Nummer(ID):", 8, 8, 268, 15)
$start = GUICtrlCreateButton("&Start", 8, 48, 128, 25, 0)
$progressCurrent = 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 $abb
Exit
Case $start
GUICtrlSetState($start,$GUI_DISABLE)
$link = _LinkLoad(GUICtrlRead($DwnInput))
$size = InetGetSize($link)
InetGet($link, @ScriptDir&"\"&GUICtrlRead($DwnInput)&".flv", 0, 1)
If @error Then
MsgBox(0,"","error")
Else
While @InetGetActive
GUICtrlSetData($progressCurrent,(@InetGetBytesRead/$size)*100)
WEnd
If @error Then
MsgBox(0,"Download","Downloaderror")
Else
MsgBox(0,"","Download abgeschlossen! Datei wird nun umgewandelt. Dieses kann je nach Dateigröße etwas Zeit in Anspruch nehmen.")
EndIf
Run('ffmpeg -i '&GUICtrlRead($DwnInput)&'.flv -vcodec mpeg1video -acodec copy -b 600 '&GUICtrlRead($DwnInput)&'.mpg')
EndIf
#cs
If Not FileExists("test.bat") Then _FileCreate("test.bat")
FileOpen("test.bat", 2)
FileWrite("test.bat", '"ffmpeg" -i ')
FileWrite("test.bat", (GUICtrlRead($DwnInput)))
FileWrite("test.bat", ".flv")
FileWrite("test.bat", " -vcodec mpeg1video -acodec copy -b 600 ")
FileWrite("test.bat", GUICtrlRead($DwnInput))
FileWrite("test.bat", ".mpg")
FileClose("test.bat")
GUIDelete()
RunWait(@ComSpec & " /c " & 'test.bat',"", @SW_HIDE)
[/autoit] [autoit][/autoit] [autoit]PluginClose("pthreadGC2.dll")
sleep(1000)
MsgBox(0,"Fertig","Fertig")
FileOpen("test.bat", 2)
FileWrite("test.bat", "")
FileClose("test.bat")
FileDelete(@ScriptDir&"/test.bat")
Exit
#ce
EndSwitch
WEnd
Func _LinkLoad($id)
$url = "http://www.myvideo.de/watch/"&$id
$source = _INetGetSource($url)
$array = StringRegExp($source, "((http://myvideo-)\d+(.)\w+(.)\w+(.net)(/)\w+(/)\w+(/)\w+(/)"&$id&"+(.flv)){1}", 2)
If IsArray($array) Then
$VidLink = $array[1]
Return $VidLink
Else
Return 1
EndIf
EndFunc
Crazy-A