Hallo,
ich hatte mal vor einiger Zeit ein Beispiel
von Seubo erhalten (Link abspeichern)
Leider funktioniert das Skript auf einmal nicht mehr!
Würde mich sehr freuen wenn mal die Profis
drüberschauen.
#include <Array.au3>
$aResults = _GoogleIt("Autoit", 30)
_ArrayDisplay($aResults)
Func _GoogleIt($sSearchQuery, $iResult = 10, $sHL = ".com")
If Not StringRegExp($sHL, "^\.\w+$") Or StringRegExp($sSearchQuery, "^\s*$") Then Return ""
If $iResult < 1 Then Return
Local $sURL, $aResult, $aReturn[$iResult][2], $i, $j
For $iStart = 0 To $iResult Step 10
$sURL = "http://www.google" & $sHL & "/search?q=" & $sSearchQuery & "&start=" & $iStart
$aResult = StringRegExp(StringRegExpReplace(BinaryToString(InetRead($sURL, 1), 4), '<em>(.+?)</em>', "\1"), '<a href="([^"]+)" class=l>(.+?)</a>', 3)
If @error Then ExitLoop
For $i = 0 To UBound($aResult) - 1 Step 2
If $j >= $iResult Then ExitLoop
$aReturn[$j][0] = $aResult[$i]
$aReturn[$j][1] = $aResult[$i + 1]
$j += 1
Next
Next
Return $aReturn
EndFunc ;==>_GoogleIt
LG
Ilse ![]()