Phasebook Posted August 15, 2011 Share Posted August 15, 2011 Hi there! I`m new in the forum and I`m a newbie, so can someone help me on small script. i`m using ff.au3 and mozrepl for using mozilla firefox. So I go to an exact webpage and use _FFsearch to find an exact phrase. I`m searching for "site visited:" and there`s a number just after it. How can I get that number? Thank you in advance! Link to comment Share on other sites More sharing options...
kaotkbliss Posted August 15, 2011 Share Posted August 15, 2011 You would need to use StringRegExp to search for site visited: then grab the numbers after. Unfortunately I'm not very good at StringRegExp yet 010101000110100001101001011100110010000001101001011100110010000 001101101011110010010000001110011011010010110011100100001 My Android cat and mouse gamehttps://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek We're gonna need another Timmy! Link to comment Share on other sites More sharing options...
PowerCat Posted August 15, 2011 Share Posted August 15, 2011 Or for the lazy (me) StringinStr and then StringLeft and StringRight ! haha Link to comment Share on other sites More sharing options...
Phasebook Posted August 19, 2011 Author Share Posted August 19, 2011 (edited) Or for the lazy (me)StringinStr and then StringLeft and StringRight ! hahaThank you, both of you!But don`t think you got me right For example the script goes to this page - http://www. youtube. com/watch?v=3O67YupAgGg (a video clip in youtube)So for example the script searchs for "likes". And the number of likes is just in front of the phrase, so how can I get that number?Thank you in advance! Edited August 19, 2011 by Phasebook Link to comment Share on other sites More sharing options...
smartee Posted August 19, 2011 Share Posted August 19, 2011 hi Phasebook, You can use BinaryToString(InetRead("http://www.yourwebsitehere.com")) to grab the page's source, then use StringRegExp as kaotkbliss suggested to extract the information you need. Here is a quick example $sSource = BinaryToString(InetRead("http://www.youtube.com/watch?v=3O67YupAgGg")) $aTitleArr = StringRegExp($sSource, '(?U)<meta name="title" content="(.*)">', 3) $aLikesArr = StringRegExp($sSource, '<span class="likes">(\d+)</span>', 3) MsgBox(64, $aTitleArr[0], $aTitleArr[0] & " has " & $aLikesArr[0] & " likes.") Hope this helps, -smartee Link to comment Share on other sites More sharing options...
Phasebook Posted August 20, 2011 Author Share Posted August 20, 2011 Oh, it helped alot Thank you all of you. This forum is great! 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