youtuber Posted September 6, 2017 Share Posted September 6, 2017 (edited) I want to get the date 2018-05-05 between results expandcollapse popup#include <Array.au3> #include <Inet.au3> #include <String.au3> #include <File.au3> #include <FileConstants.au3> #include <MsgBoxConstants.au3> #include <WinAPIFiles.au3> ;~ <div class="col-md-4 queryResponseBodyKey">Expires On</div> ;~ <div class="col-md-8 queryResponseBodyValue">2018-05-05</div> SitesExpirationdate() Func SitesExpirationdate() Local $sStr = InetRead("http://who.is/whois/autoitscript.com",0) If @error Then MsgBox(16,"Error!","Unable to retrieve information") Else $sStr = BinaryToString($sStr, 0) $aExtract = _StringBetween($sStr, '<span class="lead">Registrar Info</span>','<div>Information Updated:') If IsArray($aExtract) Then Global $aOpenFile = FileOpen(@ScriptDir & '\incomingdataTemp.txt', 1) If $aOpenFile = -1 Then MsgBox(0, "", "incomingdataTemp.txt The file could not be opened.") ;~ Return False Else FileWrite(@ScriptDir & '\incomingdataTemp.txt', $aExtract[0] & @CRLF) FileWrite($aOpenFile, $aExtract[0] & @CRLF) FileClose($aOpenFile) Local $aArray = FileReadToArray(@ScriptDir & "\incomingdataTemp.txt") For $sLine In $aArray ;ConsoleWrite($sLine & @CRLF) $aExtract2 = _StringBetween($sLine & @CRLF, '<div class="col-md-4 queryResponseBodyKey">Expires On</div>','</div>') If IsArray($aExtract2) Then For $a = 1 To $aExtract2[0] ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $aExtract2[0] = ' & $aExtract2[0] & @CRLF & '>Error code: ' & @error & @CRLF); Next FileClose($aOpenFile) EndIf Next EndIf EndIf EndIf EndFunc Edited September 6, 2017 by youtuber Link to comment Share on other sites More sharing options...
Danyfirex Posted September 6, 2017 Share Posted September 6, 2017 Hello. You can do something like this: #include <Array.au3> Local $sStr = BinaryToString(InetRead("http://who.is/whois/autoitscript.com",1)) Local $aReg = StringRegExp($sStr, "(\d{4}-\d{2}-\d{2})", 1) _ArrayDisplay($aReg) Saludos youtuber 1 Danysys.com AutoIt... UDFs: VirusTotal API 2.0 UDF - libZPlay UDF - Apps: Guitar Tab Tester - VirusTotal Hash Checker Examples: Text-to-Speech ISpVoice Interface - Get installed applications - Enable/Disable Network connection PrintHookProc - WINTRUST - Mute Microphone Level - Get Connected NetWorks - Create NetWork Connection ShortCut Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now