Jump to content
Sign in to follow this  
Trojan55

Getting Text HTML

Recommended Posts

Trojan55

Hi All, I'm trying to get the text of google button but i can't

here is the source :

$src = InetRead("https://www.google.dz/")
$fix = BinaryToString($src)
$chg = StringRegExp($fix,'<span id="gbqfsa">Recherche (.*?)</span>',3)
MsgBox(0,"",$chg)

What's the problem?


Share this post


Link to post
Share on other sites
mrflibblehat

$chg will return an array.

I also notice that $fix does not have any such source code in. Maybe this is served up client side in the browser by javascript. not so sure how that works.

Best I can suggest is

$src = BinaryToString(InetRead("https://www.google.dz/"))
$chg = StringRegExp($src,'"srch"\:"(.*?)"', 3)

MsgBox(0,"",$chg[0])
Edited by mrflibblehat
  • Like 1

[font="'courier new', courier, monospace;"]Pastebin UDF | Prowl UDF[/font]

Share this post


Link to post
Share on other sites
Trojan55

Wow Thanks!!! That's what i was searching about... :D

But Why did you do "srch":?

Edited by Trojan55

Share this post


Link to post
Share on other sites
mrflibblehat

Hi Trojan55,

If you look at $src it doesnt show the full google source, but I found a part of the source code which shows the button name and that was. "srch"


[font="'courier new', courier, monospace;"]Pastebin UDF | Prowl UDF[/font]

Share this post


Link to post
Share on other sites
Trojan55

Hi Trojan55,

If you look at $src it doesnt show the full google source, but I found a part of the source code which shows the button name and that was. "srch"

Oh Thanks yea :)


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  

×