Jump to content
Sign in to follow this  

Search html?

Recommended Posts



Is there someone who can tell me how to find out if a certain word/phrase is present in a html. Preferably with an @error output.

I have tried to look in the help file at _IEBodyReadHTML but that cant be the right way?


Share this post

Link to post
Share on other sites


I'm working also, I do research on information from my DVDs on a website.

I'm on page analysis yet.

#include <INet.au3>
#include <String.au3>
#include <Array.au3>
    Local $titre = "Butterfly effect"

    Local $html = _INetGetSource("http://www.allocine.fr/recherche/?motcle=" & URLEncode($titre))
     ;<h2 class="SpBlocTitle" >Films
    Local $aArray1 = _StringBetween($html, '<h2 class="SpBlocTitle" >Films', '</table><br />')
    _ArrayDisplay($aArray1, 'Default Search')

Func URLEncode($urlText)
    Local $url = ""
    For $i = 1 To StringLen($urlText)
        $acode = Asc(StringMid($urlText, $i, 1))
            Case ($acode >= 48 And $acode <= 57) Or _
                    ($acode >= 65 And $acode <= 90) Or _
                    ($acode >= 97 And $acode <= 122)
                $url &= StringMid($urlText, $i, 1)
            Case $acode = 32
                $url &= "+"
            Case Else
                $url &= "%" & Hex($acode, 2)
    Return $url
EndFunc   ;==>URLEncode

The function URLEncode find in this forum.

Try This, hope is help

Edited by GaRydelaMer

Share this post

Link to post
Share on other sites

Please post your code :)

Also have a look at StringInStr.



Sorry, ain't got any code yet. I'm trying to make a "send sms when new mails are in my inbox". But I don't know if its possible yet. I've looked at the sourcecode and when I've got a new email the word "New" apears in the sourcecode of my emailclient. With the StringInStr I supose the string to search have to be there at all times but this string containig the word "New" only apears when I have a new email.

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
Sign in to follow this  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.