Ich probiere seit gestern Rapidshare zu automatisieren,das ganze klappt(e) eigentlich ganz gut(, bis ich folgendes Problem hatte):
Spoiler anzeigen
#include<HTTP.au3>
Global $Socket, $Source, $Host = "www.rapidshare.com", $Page
$Socket = _HTTPConnect($Host)
_HTTPGet($Host, $Page, $Socket) ; Für $Page z.B. '/files/88342326/Revbot_1.4v6.rar' einsetzen
$Source = _HTTPRead($Socket) ; Gibt den Quellcode der Seite wieder
;Die nächsten beiden Zeilen lesen den neuen $Host aus dem Quellcode aus, z.B. 'rs89.rapidshare.com'
$host = StringLeft(StringTrimLeft($read,StringInStr($read,'<form action="',0,1)+13),StringInStr(StringTrimLeft($read,StringInStr($read,'<form action="',0,1)+13),'"',0,1)-1)
$host = StringLeft(StringTrimLeft($host,7),StringInStr(StringTrimLeft($host,7),"/",0,1)-1)
Dim $Socket
$Socket = _HTTPConnect($Host) ; Verbinde mit dem neuen $Host
_HTTPGet($host, $page, $socket)
$Source = _HTTPRead($Socket) ; funktioniert noch, wird aber nicht benötigt, zur Überprüfung
; wenn ich nun:
_HTTPPost($host, $page, $socket, 'dl.start=Free')
; absende, dann bekomme ich keinen Quelltext mehr mit dieser Zeile zurück:
$Source = _HTTPRead($Socket)
eine Automatisierung mit IE geht nicht, weil der die File selber herunterladen will, trotzdem hier der Source Code:
Spoiler anzeigen
#include<IE.au3>
#include<String.au3>
Local $oRS, $soRSSe_o, $soRSSe, $soRSSe_n, $_soRSSe, $RSURL
$RSURL = InputBox("Insert Rapidshare Link","Paste Rapidshare Link here")
$oRS = _IECreate($RSURL,0,1,1,-1)
_IELoadWait($oRS)
$oRSSF = _IEFormGetCollection($oRS,0)
$oRSSFF = _IEFormElementGetCollection($oRSSF, 1)
_IEAction($oRSSFF, "click")
_IELoadWait($oRS)
$soRSS = _IEBodyReadHTML($oRS)
$iRST = Int(StringLeft(StringTrimLeft($soRSS,StringInStr($soRSS,"var c=")+5),2) + 2)
Sleep($iRST*1000)
$soRSS = _IEPropertyGet($oRS,"innerhtml")
$oRSSF = _IEFormGetObjByName($oRS,"dl")
$oRSSFF = _IEFormElementGetCollection($oRSSF, 0)
_IEFormElementRadioSelect($oRSSF,0,"mirror",1,"byIndex")
$oRSSFFHI = _IEFormElementGetObjByName($oRSSF,"accesscode")
$DLL = StringLeft(StringTrimLeft($soRSS,StringInStr($soRSS,'<INPUT onclick="document.dl.action=',0,1)+35),StringInStr(StringTrimLeft($soRSS,StringInStr($soRSS,'<INPUT onclick="document.dl.action=',0,1)+35),"';",0,1)-1)
MsgBox(0,"",$DLL)
$FilePraefix=StringLeft(StringTrimLeft($DLL,StringInStr($DLL,"/",0,-1)),StringInStr(StringTrimLeft($DLL,StringInStr($DLL,"/",0,-1)),".")-1)
$FileSuffix=StringTrimLeft($DLL,StringInStr($DLL,$FilePraefix)+StringLen($FilePraefix)-1)
MsgBox(0,"",$FilePraefix&$FileSuffix)
InetGet(StringLeft(StringTrimLeft($soRSS,StringInStr($soRSS,'Bitte<BR><IMG src="')+18),StringInStr(StringTrimLeft($soRSS,StringInStr($soRSS,'Bitte<BR><IMG src="')+18),".jpg",0,1)+3),@TempDir&"\RSCAPTCHA.jpg",1,1)
_IEFormElementSetValue($oRSSFFHI,InputBox("Please Insert Security Code","Please Insert Security Code"))
_IEFormSubmit($oRSSF)
_IEQuit($oRS)
InetGet($DLL,@ScriptDir&"\Downloads\"&$FilePraefix&$FileSuffix,1,1)
While @InetGetActive
TrayTip("Downloading...","Downloading...",1)
WEnd
ich hoffe, ihr habt eine lösung parat...
HTTP.au3