Results 1 to 5 of 5
  1. #1
    powerful36 is offline Member
    Join Date
    Aug 2009
    Posts
    3
    Rep Power
    0

    Default Using java to track auctions

    Hi people,

    I am trying to to write a auction tracking program to track swoopo auctions. I want to be able to keep track number of auctions with live update of current prices, and winning bidders, and time remaining especially.

    After inspecting the source code, I found my original idea of just reading text from the page would not work as there is nothing to be read for time remaining. It only had something like this:

    ...
    <div class="prd_countdown"><span id="counter_index_page_209566">--:--:--</span></div>
    ...

    And now I believe I have to somehow get the information from the javascript file, which I have no idea how to do. I wonder if anyone can point me to the right direction.

    Many thanks

  2. #2
    mrmatt1111's Avatar
    mrmatt1111 is offline Senior Member
    Join Date
    Aug 2009
    Location
    San Jose, CA, USA
    Posts
    320
    Rep Power
    6

    Default

    First off, just so you are on the same page as this forum... java is not at all the same as javascript.

    Secondly, unless you want to be posting text files by hand with up-to-date info then you will probably need to look into using a database i.e. MySQL.

    Lastly, if you do plan to use java and on a webpage then you will need to look into java applets and maybe JSP.
    My Hobby Project: LegacyClone

  3. #3
    powerful36 is offline Member
    Join Date
    Aug 2009
    Posts
    3
    Rep Power
    0

    Default

    Thank you for the quick reply.

    Yes, I am planning on writing this tracker in Java, that's all I know really.

    I don't quite understand your second point.

    I don't plan to use it on a webpage. For now, I just want to be able to read time remaining, and then output it in the console screen in Eclipse. I can achieve this with current price and winning bidder as they have them written as actual text in the source code.

  4. #4
    mrmatt1111's Avatar
    mrmatt1111 is offline Senior Member
    Join Date
    Aug 2009
    Location
    San Jose, CA, USA
    Posts
    320
    Rep Power
    6

    Default

    ahhhh, oops, sorry, I totally misunderstood your original post. I understand now, you want to gather information from an existing website and track it in a program. :)

    Java will allow you to make calls to a webpage and you can get back the html, from there you can parse out the stuff you are interested in... i have done it before, but i don't have any tips or sample code. :(
    My Hobby Project: LegacyClone

  5. #5
    powerful36 is offline Member
    Join Date
    Aug 2009
    Posts
    3
    Rep Power
    0

    Default

    Exactly!

    Yes, I got as far as that. I can replicate the entire source code easily enough. However, when there is javascript involved, it's a bit more tricky. Sometimes, source code does not directly reflect what's shown on browser, and in this particular case the part which is related to the time remaining timer looks like:

    <div class="countdown_nrs" id="countertime">--&nbsp;:&nbsp;--&nbsp;:&nbsp;--</div>

    I managed to find "countertime" in one of the js file which html code imported between <head></head>. The question is how would I get java to interpret that as a normal browser would do?

Similar Threads

  1. Trace and track hp number on jsp
    By angelicsign in forum JavaServer Pages (JSP) and JSTL
    Replies: 0
    Last Post: 12-16-2008, 06:39 AM
  2. Replies: 0
    Last Post: 11-24-2008, 06:48 PM
  3. JAVA Fast Track Course
    By fortius_computers in forum Reviews / Advertising
    Replies: 0
    Last Post: 08-30-2008, 09:55 AM
  4. How to track client logout time and orignal ipaddress (not gateway) in java
    By psandeep in forum JavaServer Pages (JSP) and JSTL
    Replies: 1
    Last Post: 06-13-2008, 12:32 AM
  5. Track download
    By nilesh.malode in forum Advanced Java
    Replies: 1
    Last Post: 07-13-2007, 09:44 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •