It sounds like you are trying to automate what would happen if you went to a URL (at teenopendiary) and clicked delete note (am I following you so far?)

First let me say that Javascript (which is not the same thing as Java BTW) is most likely not your problem. To delete a note that resides on their server they'll be using some sort of client side language (ASP it looks like) where Javascript is client side and can't do anything to the server.

What you need to do is find out the specific request created to delete an item from that site. If they use a GET request then just delete something and copy the URL that appears. This is what you want. Then use the LWP::Simple module (should be in your standard Perl) to recreate the request.

Of course its probably not going to be that easy :). My guess is that teenopendiary has some kind of security measure in place that involves cookies or sessions and most likely uses POST requests. For those you'll probably need to use the full LWP module (also should be in Perl but if not you can get it from CPAN). I'm not going to go in depth on how to do it right now, go examine the site to see if you can figure out how their requests work. If they have a <form method="POST"> tag then look at all the <input> tags, including the hidden ones. If you can get that information, then its possible to recreate the request. (check your cookies too)

Update: I forgot to mention that before you do this you should check their terms of service. Often sites don't like this sort of thing. You may not agree with that, but that won't stop them from making your life unhappy if they catch you doing it.

Lobster Aliens Are attacking the world!

In reply to Re: Converting Javascript to Perl by cfreak
in thread Converting Javascript to Perl by sulfericacid

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.