Jump to content

how can i get specific value in web page with save it in txt


geotau3
 Share

Recommended Posts

You can just read the webpage into memory, storing the text of the page in a variable. Then scrape the page however you want

Local $sWebpage = BinaryToString(InetRead("https://www.autoitscript.com/"))
Local $aRegExp = StringRegExp($sWebpage, '<h2><a href="https\://www\.autoitscript\.com/site/autoit-news/autoit-v.*-released/">AutoIt v(.*) Released</a></h2>', 3)

If (@error) Then
    ConsoleWrite("Could not detect autoit release versions" & @CRLF)
Else
    ConsoleWrite("Latest AutoIt Version: " & $aRegExp[0] & @CRLF)
    For $i = 1 To UBound($aRegExp) - 1
        ConsoleWrite(@TAB & "Previous Version: " & $aRegExp[$i] & @CRLF)
    Next
EndIf

 

Link to comment
Share on other sites

Well there's no file in my example. And using more memory is not going to affect the speed of your process (if it does it's not worth mentioning)

You can set the variable to Null/0 when you're done with it to clear it

If you want to save the downloaded webpage to a file then just use FileWrite.

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...