[Frage]Youtube Downloader

    Diese Seite verwendet Cookies. Durch die Nutzung unserer Seite erklären Sie sich damit einverstanden, dass wir Cookies setzen. Weitere Informationen

    • [Frage]Youtube Downloader

      Hi alle Autoit Coder ich bin im Netz auf einen Youtube downloader Code gestoßen , der folgendermaßen aussieht ...

      C-Quellcode

      1. #include <GUIConstants.au3>
      2. #include <inet.au3>
      3. GUICreate("You Tube Video-Downloader", 273, 105, 193, 115, -1)
      4. $DwnInput = GUICtrlCreateInput("http://www.youtube.com/watch?v=6DEh0eSpNvY", 8, 24, 257, 21)
      5. GUICtrlCreateLabel("www.youtube.com Download Link:", 8, 8, 268, 15)
      6. $start = GUICtrlCreateButton("&Start", 8, 48, 128, 25, 0)
      7. $Progress = GUICtrlCreateProgress(8, 80, 257, 16)
      8. $abb = GUICtrlCreateButton("A&bbruch", 137, 48, 128, 25, 0)
      9. GUISetState(@SW_SHOW)
      10. While 1
      11. $nMsg = GUIGetMsg()
      12. Switch $nMsg
      13. Case $GUI_EVENT_CLOSE
      14. Exit
      15. Case $start
      16. GUICtrlSetState($start,$GUI_DISABLE)
      17. $dwnlink = GUICtrlRead($DwnInput)
      18. $sCode=_INetGetSource ($dwnlink)
      19. $s_t=StringRegExp($sCode, "&t=(.*?)&", 3)
      20. $s_v=stringmid($dwnlink,stringinstr($dwnlink,"v=")+2)
      21. $save = FileSaveDialog("Speichere SWF","","Flash(*.swf)",-1,$s_v)
      22. If StringRight($save,4) <> ".swf" Then $save&=".swf"
      23. _Download("http://youtube.com/get_video?video_id=" & $s_v & "&t=" & $s_t[0], & $save, & $Progress)
      24. GUIDelete()
      25. MsgBox(0,"","Fertig!")
      26. Exit
      27. EndSwitch
      28. WEnd
      29. Func _Download($site,$punkt,$prog=0)
      30. $orisize = InetGetSize($site)
      31. InetGet($site,$punkt,1,1)
      32. If $prog = 0 Then ProgressOn("Download","")
      33. Do
      34. $msg = GUIGetMsg()
      35. If $msg = $abb Then
      36. If MsgBox(4,"","Abbruch?") = 6 Then Exit
      37. EndIf
      38. $size1 = FileGetSize($punkt)
      39. $MBsize1 = FileGetSize($punkt)
      40. $inetget = @InetGetBytesRead
      41. $Prozent = (100 * $inetget ) / $orisize
      42. $decimalplace = Round ($Prozent)
      43. $decimalplaceMBsize1 = Round (@InetGetBytesRead / 1024)
      44. If $prog = 0 Then
      45. ProgressSet ($Prozent, $decimalplace & "% " & "(" & $decimalplaceMBsize1 & ") Kb sind bereits gedownloadet.")
      46. Else
      47. GUICtrlSetData($prog,$Prozent)
      48. EndIf
      49. Until @InetGetActive = 0
      50. If $prog = 0 Then ProgressOff ()
      51. Return $punkt
      52. 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

      Autoit.de schrieb:

      lad 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

      Quellcode

      1. set /p Name=Type in the name of the flv(without .flv):
      2. 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
    • Werbung zur Unterstützung des Forums ( Bitte AddBlocker deaktivieren )

    • also zu dem errror:
      iwo is ne variable, welche eigentlich als array benutzt wird im script
      diese ist aber kein array, wenn sie benutzt wird
      deswegen muss man die iwie zu nem array machrn, aber wo der befehl dafür ist im code, weiß ich nicht
      ich würde sie nämlich nicht als array deklarieren
      weiß nicht, was das für auswirkungen hat
    • Also ich habe den selben Code auf dem Pc. Von wem der war, kann ich leider nicht mehr sagen.
      Code:

      C-Quellcode

      1. #include <GUIConstants.au3>
      2. #include <inet.au3>
      3. GUICreate("You Tube Video-Downloader", 273, 105, 193, 115, -1)
      4. $DwnInput = GUICtrlCreateInput("Hier YouTube Link Rein !", 8, 24, 257, 21)
      5. GUICtrlCreateLabel("www.youtube.com Download Link:", 8, 8, 268, 15)
      6. $start = GUICtrlCreateButton("&Start", 8, 48, 128, 25, 0)
      7. $Progress = GUICtrlCreateProgress(8, 80, 257, 16)
      8. $abb = GUICtrlCreateButton("A&bbruch", 137, 48, 128, 25, 0)
      9. GUISetState(@SW_SHOW)
      10. While 1
      11. $nMsg = GUIGetMsg()
      12. Switch $nMsg
      13. Case $GUI_EVENT_CLOSE
      14. Exit
      15. Case $start
      16. GUICtrlSetState($start,$GUI_DISABLE)
      17. $dwnlink = GUICtrlRead($DwnInput)
      18. $sCode=_INetGetSource ($dwnlink)
      19. $s_t=StringRegExp($sCode, "&t=(.*?)&", 3)
      20. $s_v=stringmid($dwnlink,stringinstr($dwnlink,"v=")+2)
      21. $save = FileSaveDialog("Speichere FLV","","Flash Video(*.flv)",-1,$s_v)
      22. If StringRight($save,4) <> ".swf" Then $save&=".wav"
      23. _Download("http://youtube.com/get_video?video_id=" & $s_v & "&t=" & $s_t[0],$save,$Progress)
      24. GUIDelete()
      25. MsgBox(0,"","Fertig!")
      26. Exit
      27. EndSwitch
      28. WEnd
      29. Func _Download($site,$punkt,$prog=0)
      30. $orisize = InetGetSize($site)
      31. InetGet($site,$punkt,1,1)
      32. If $prog = 0 Then ProgressOn("Download","")
      33. Do
      34. $msg = GUIGetMsg()
      35. If $msg = $abb Then
      36. If MsgBox(4,"","Abbruch?") = 6 Then Exit
      37. EndIf
      38. $size1 = FileGetSize($punkt)
      39. $MBsize1 = FileGetSize($punkt)
      40. $inetget = @InetGetBytesRead
      41. $Prozent = (100 * $inetget ) / $orisize
      42. $decimalplace = Round ($Prozent)
      43. $decimalplaceMBsize1 = Round (@InetGetBytesRead / 1024)
      44. If $prog = 0 Then
      45. ProgressSet ($Prozent, $decimalplace & "% " & "(" & $decimalplaceMBsize1 & ") Kb sind bereits gedownloadet.")
      46. Else
      47. GUICtrlSetData($prog,$Prozent)
      48. EndIf
      49. Until @InetGetActive = 0
      50. If $prog = 0 Then ProgressOff ()
      51. Return $punkt
      52. EndFunc
      Alles anzeigen


      Als Versuchsobjekt habe ich diesen Link genommen:

      Quellcode

      1. http://www.youtube.com/watch?v=DlS8RO2_LmQ


      Hoffe es klappt :have a nice day: