Jump to content
Sign in to follow this  
houseonfire

Grabbing text from forum

Recommended Posts

houseonfire

Hello all.

I am having trouble with a script I am writing.

I need to navigate to a post on a forum, and grab the subject and message body from a post. And then write the post to a text file.

Case $grab
    _IENavigate ($IE, "www.postlink.com")
    $subid = _IEFormGetObjByName ($IE, "subject")
    $msgid = _IEFormGetObjByName ($IE, "message")
    $subread = _IEFormElementGetObjByName ($subid, 0)
    $msgread = _IEFormElementgetObjbyName ($msgID, 0)
    $readi = _IEFormElementSetValue ($subread, $subid)
    $readu = _IEFormElementSetValue ($msgread, $msgid)
    FileWriteLine ("/text.txt", $readi & $readu)

Share this post


Link to post
Share on other sites
enaiman

What exactly is the problem? The text file shows nothing? shows wrong text? you aren't able to pull the content?

Be more explicit if you want help.


SNMP_UDF ... for SNMPv1 and v2c so far, GetBulk and a new example script

wannabe "Unbeatable" Tic-Tac-Toe

Paper-Scissor-Rock ... try to beat it anyway :)

Share this post


Link to post
Share on other sites
Bert

Case $grab
    _IENavigate ($IE, "www.postlink.com")
    $subid = _IEFormGetObjByName ($IE, "subject")
    $msgid = _IEFormGetObjByName ($IE, "message")
    $subread = _IEFormElementGetObjByName ($subid, 0)
    $msgread = _IEFormElementgetObjbyName ($msgID, 0)
    $readi = _IEFormElementSetValue ($subread, $subid)
    $readu = _IEFormElementSetValue ($msgread, $msgid)
    FileWriteLine ("/text.txt", $readi & $readu)

www.postlink.com - the webpage has almost no content on it. here is the source code for the page you are referencing

<html>

<head>
<meta http-equiv="content-type" content="text/html; charset=euc-kr">
<title>PostLink.com</title>
<meta name="generator" content="Namo WebEditor v5.0">
</head>

<body bgcolor="white" text="black" link="blue" vlink="purple" alink="red">
<p align="center"><br><br><br><br><br><br><br><font color="red"><b><span style="letter-spacing:2px;">Post</span></b></font><font color="#009933"><b><span style="letter-spacing:2px;">Link</span></b></font><b><span style="letter-spacing:2px;">.com</span></b></p>
</body>

</html>
Edited by Volly

Share this post


Link to post
Share on other sites
houseonfire

Maybe I wasn't specific enough.

I need to grab the a post off of a forum. I did not mean the link i had, it was an example.

I need the post to be outputted into the text file. It does not appear in the text file.

Example:

I need to grab this post:

Subject line: "This is a subject!"

Post:

Yay this is a post.

I have a picture

%7Boption%7D this is my picture [/ img]

and here is my script:

script
    script
script

That is what the post source would look like. I need to copy it exactly into the text document.

Edited by houseonfire

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.