Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 3 of 3

Thread: Pulling data from a URL

  1. #1
    Junior Member
    Join Date
    Sep 2014
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Pulling data from a URL

    I am hoping to write a program that will take in a URL as input and then search through the text on that webpage to pull out relevant data.
    Essentially, my plan was to have the program search the webpage on certain strings and then find and record the numbers on the same line to compile into another file. Luckily, all of the data I need are in tables on the webpage so I assumed that would make it easier to get the data.

    The problem that I am facing is that I do not know where to start. I have been searching the web for answers to this but, unfortunately, the only thing people tend to recommend is using an HTML parser. This would not help since HTML code is not what I am looking for and does not include the data I seek. Having said that, simply pointing me in the right direction on this issue would be substantially helpful.

    In advance, I appreciate your help.


  2. #2
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    5,520
    My Mood
    Mellow
    Thanks
    215
    Thanked 697 Times in 679 Posts

    Default Re: Pulling data from a URL

    Welcome to the forum! Please read this topic to learn how to post code in code or highlight tags and other useful info for new members.

    Data mining of web pages is a huge topic that can't be distilled into a few pages or links. I haven't seen this topic discussed here, so I don't know what experience might be available to help you. Since you're somewhat vague about what you're looking for, I suggest you continue to read what you can on data mining and return when you can be less vague about what help you need.

  3. #3
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    22,318
    Thanks
    53
    Thanked 2,392 Times in 2,346 Posts

    Default Re: Pulling data from a URL

    Have you looked at the text of the web page that is returned by the server? View Source in most browsers.
    If the protocol is HTTP then the page should be wrapped in html and can contain some javascript to make it very confusing and hard to parse.
    If you don't understand my answer, don't ignore it, ask a question.

Similar Threads

  1. Beginner: Pulling Multiple Predefined Entries
    By Rattarded in forum JDBC & Databases
    Replies: 2
    Last Post: March 26th, 2014, 04:30 AM
  2. [SOLVED] help pulling information from different classes when you have more than one
    By mickey2012 in forum What's Wrong With My Code?
    Replies: 3
    Last Post: February 6th, 2012, 09:38 PM
  3. Pulling Data from Website
    By aussiemcgr in forum Java Theory & Questions
    Replies: 0
    Last Post: August 20th, 2010, 08:42 AM
  4. Pulling in data from access
    By tdc5013 in forum JDBC & Databases
    Replies: 2
    Last Post: March 15th, 2010, 04:40 PM