geotau3 Posted November 8, 2016 Share Posted November 8, 2016 how can i get specific value in web page with save it in txt file Link to comment Share on other sites More sharing options...
EmilyLove Posted November 8, 2016 Share Posted November 8, 2016 Depends on the website. Each website has a different approach. Link to comment Share on other sites More sharing options...
geotau3 Posted November 8, 2016 Author Share Posted November 8, 2016 let say it show up as HTML code i want certain of value Link to comment Share on other sites More sharing options...
geotau3 Posted November 8, 2016 Author Share Posted November 8, 2016 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 Link to comment Share on other sites More sharing options...
geotau3 Posted November 8, 2016 Author Share Posted November 8, 2016 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 Link to comment Share on other sites More sharing options...
InunoTaishou Posted November 8, 2016 Share Posted November 8, 2016 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 More sharing options...
geotau3 Posted November 8, 2016 Author Share Posted November 8, 2016 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 Link to comment Share on other sites More sharing options...
InunoTaishou Posted November 9, 2016 Share Posted November 9, 2016 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 Link to comment Share on other sites More sharing options...
geotau3 Posted November 10, 2016 Author Share Posted November 10, 2016 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 Link to comment Share on other sites More sharing options...
InunoTaishou Posted November 10, 2016 Share Posted November 10, 2016 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 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