geotau3

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

10 posts in this topic

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

Share this post


Link to post
Share on other sites



Depends on the website. Each website has a different approach.


My Scripts:

False Positive Reporter - Mass email all anti virus vendors with an attachment of your program for easy whitelisting.

PortableApps.com App Creation Wizard  - A simple GUI-based Wizard for creating PortableApps.

AutoISO  - Automatic ISO Image creation using ImgBurn.

SoundBoard - Play any song or sound you want at the press of a hotkey

Share this post


Link to post
Share on other sites

let say it show up as HTML code i want certain of value 

Share this post


Link to post
Share on other sites

i can save it to text file then search for my target value but i don't want do the jobs too hard i just want 2 bit of data not 2 mega

Share this post


Link to post
Share on other sites

other wise any app build to collect some data pages will be too hard to use it and slow 

just get search for specific value and then show it i arry that all  

Share this post


Link to post
Share on other sites

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

 

Share this post


Link to post
Share on other sites

thanks a lot one more thing 

Can i pick witch line i need form html web to read to minimize the size and cut time to minim use to be faster 

like split the the code or just target specific area in code or line 

thank again 

Share this post


Link to post
Share on other sites

You can split the $sWebpage using StringSplit and work with it like that, if you know the exact line. But it may be faster to just use StringInStr and/or StringRegExp

Share this post


Link to post
Share on other sites

thanks 

the code was good but the all code you got will saved in memory (RAM)

how can make sure the number of file will save will deleted after take specific code to make app very fast and not getting slow after while

thanks again 

Share this post


Link to post
Share on other sites

#10 ·  Posted

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.

Share this post


Link to post
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