ich versuche mit allen mir bekannten Möglichkeiten die ich von AHK kenne diese Seite zu laden:
https://www.vrs.de/am/s/8d6f16360061f7360b9d32257184a917
Der begehrte Teil fehlt jedoch. Im Chrome kann ich die gesuchten Zeilen finden.
Ich möchte nur die erste Abfahrtzeile auslesen. Kann mir jemand zeigen ob und wie das geht?
Code: Select all
url = https://www.vrs.de/am/s/8d6f16360061f7360b9d32257184a917
;urldownloadtofile,% url, urldownloadtofile.html
;clipboard := UrlDownloadToVar#1(url)
;clipboard := UrlDownloadToVar#2(url)
;clipboard := UrlDownloadToVar#3(url)
;clipboard := webGet(url)
webGet(url) {
whr := ComObjCreate("WinHttp.WinHttpRequest.5.1"), whr.Open("GET", url), whr.Send()
Return whr.ResponseText
}
;##
UrlDownloadToVar#1(url) {
req := ComObjCreate("Msxml2.XMLHTTP")
req.open("GET", url, False)
req.Send()
Return req.responseText
}
;##
UrlDownloadToVar#2(url) {
oHTTP := ComObjCreate("MSXML2.XMLHTTP.6.0")
Loop {
Try {
oHTTP.open("GET", url, false)
oHTTP.send()
status := oHTTP.status
if (status != 200)
nochmal := 1
}
catch e {
Tooltip Fehler
}
} until !nochmal
Return oHTTP.responseText
}
;##
UrlDownloadToVar#3(url) {
whr:= ComObjCreate("WinHttp.WinHttpRequest.5.1")
ComObjError(false)
whr.Silent := True ;- script failure = off
whr.SetTimeouts(500,500,500,500)
whr.Open("GET", url,false)
whr.Send()
whr.WaitForResponse(120)
;H := whr.ResponseText
Return whr.ResponseText
}
; ##
<tr><td class="col-minutesToDeparture"><span class="minutes">3:09 h</span></td><td class="col-line"><img src="/typo3conf/ext/vrs_info/Resources/Public/Images/Transport/Bus.svg" width="26px" height="26px" alt="{f:translate(key:'product.Bus')}" style="max-height: 20px;">127</td><td class="col-direction">Longericher Str.</td></tr>