Jump to content
Sign in to follow this  
Medic873

Pull Text From Webpage

Recommended Posts

Medic873

Okay normally I dont have issues with somthing as basic as pulling text from a website but how can I pull the two passwords displayed on this page.

$UsernameAndPassword = _IECreate("http://www.generate-password.com/")

_IELoadWait ($UsernameAndPassword)

there is my code obviously the url is

www.generate-password.com/

thank in advance

Share this post


Link to post
Share on other sites
Sheik

#include "IE.au3"
#include "array.au3"
$UsernameAndPassword = _IECreate("http://www.generate-password.com/")
_IELoadWait ($UsernameAndPassword)
$sText = _IEBodyReadHTML ($UsernameAndPassword)
$pw=StringRegExp($sText,"value=........",3)
_ArrayDisplay($pw)

Share this post


Link to post
Share on other sites
Medic873

Okay that is working great the only question I have to ask is now how can I make it minuse the Value= after it has pulled it....

thank you

Share this post


Link to post
Share on other sites
somdcomputerguy

A spin from Sheik's code..

#include <INet.au3>
$aPasses = StringRegExp(_INetGetSource('http://www.generate-password.com'),"value=........", 3)
MsgBox(0, "Generated Passwords", @TAB & StringReplace($aPasses[0],'value="', "") & ' : ' & StringReplace($aPasses[1],'value="', ""))

- Bruce /*somdcomputerguy */  If you change the way you look at things, the things you look at change.

Share this post


Link to post
Share on other sites
Medic873

Hey thank you that code works perfect had to divide it up just a bit and get ride of the msgbox witch confused me a bit but now that I look back at it I dont know why lol

brain freeze

lol

thank you

Share this post


Link to post
Share on other sites
somdcomputerguy

Glad it worked out for you. :blink:


- Bruce /*somdcomputerguy */  If you change the way you look at things, the things you look at change.

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  

×