Arclite86 Posted January 22, 2014 Share Posted January 22, 2014 I want to copy a text line from a internet page ( i know how to track elements) and show it on a program display so i dont have to visit the a website every time to check this line or nummers but just to start up a program with ( created with uda formsdesigners) and see/check the nummers. Link to comment Share on other sites More sharing options...
dcat127 Posted January 22, 2014 Share Posted January 22, 2014 A little more information would be helpful... What website are you getting the information from? I would probably start by getting the info with InetRead() and then extracting it with a StringRegExp. Link to comment Share on other sites More sharing options...
somdcomputerguy Posted January 22, 2014 Share Posted January 22, 2014 This thread may help. There are some variables that would need to be changed in the code I provided. If you don't understand that, post here again. I or somebody can explain it. '?do=embed' frameborder='0' data-embedContent>> - Bruce /*somdcomputerguy */ If you change the way you look at things, the things you look at change. Link to comment Share on other sites More sharing options...
Arclite86 Posted January 23, 2014 Author Share Posted January 23, 2014 This thread may help. There are some variables that would need to be changed in the code I provided. If you don't understand that, post here again. I or somebody can explain it. '?do=embed' frameborder='0' data-embedContent>> Thank you #include <IE.au3> #include <MsgBoxConstants.au3> call ("signIn") Func signIn () #include <IE.au3> $oIE = _IECreate("https://twitter.com/followbacklist3") ; put the url inside $sTxt = $oIE.Document.getElementsByclass("js-nav").item(0).innertext MsgBox(0, "", $sTxt) EndFunc i want to get the followers nummer, but i dont know how to get the class, This is the followers nummer code: <a class="js-nav" href="/followbacklist3/followers" data-element-term="follower_stats" data-nav="followers"> <strong>830</strong> volgers</a> how do i get this Link to comment Share on other sites More sharing options...
dcat127 Posted January 23, 2014 Share Posted January 23, 2014 $var = InetRead("https://twitter.com/followbacklist3",1) $var = BinaryToString($var) $loc1 = StringInStr($var,'follower_stats" data-nav="followers" data-is-compact="false"> Followers<strong title="') $len1 = StringLen('follower_stats" data-nav="followers" data-is-compact="false"> Followers<strong title="') $var = StringTrimLeft($var,$loc1+$len1-1) $loc1 = StringInStr($var,'"') $var = StringLeft($var,$loc1-1) MsgBox(0,"",$var) This seems to work. Someone the understands Regex better than me could shorten the code. Link to comment Share on other sites More sharing options...
mikell Posted January 23, 2014 Share Posted January 23, 2014 (edited) $txt = BinaryToString(InetRead("https://twitter.com/followbacklist3", 1)) $res0 = StringRegExpReplace($txt, '(?s).+data-nav="profile"\D+?(\d*)\D*?(\d+)\s*<.+', "$1$2") $res1 = StringRegExpReplace($txt, '(?s).+data-nav="following"\D+?(\d*)\D*?(\d+)\s*<.+', "$1$2") $res2 = StringRegExpReplace($txt, '(?s).+data-nav="followers"\D+?(\d*)\D*?(\d+)\s*<.+', "$1$2") MsgBox(0,"", "tweets : "&$res0 & @crlf & "following : "&$res1 & @crlf & "followers : "&$res2) Edit typos Edited January 23, 2014 by mikell 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