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: HttpURLConnection doesnt quite cut it

  1. #1
    Member
    Join Date
    May 2010
    Posts
    37
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default HttpURLConnection doesnt quite cut it

    i am using HttpURLConnection to grab search results from web pages
    i want to use it on this site
    Twitch
    but the source code returned does not have the title, description etc in the source code
    instead they have variables which look like {{title}}, {{description}} in its place
    i have searched all of the java script files and all the other files in the source code for these variable values and cannot find them
    but if the web browser can translate these variables into their values, there must be a way i can do it in java
    does anyone know if there are other functions like HttpURLConnection that have the functionality i am looking for?


  2. #2
    Forum VIP
    Join Date
    Jul 2010
    Posts
    1,676
    Thanks
    25
    Thanked 329 Times in 305 Posts

    Default Re: HttpURLConnection doesnt quite cut it

    I don't know for sure, but I would assume HttpURLConnect doesn't launch the query when it connects, and even if it did, it probably doesn't pull in the other references that the page requires to load correctly in the browser. Based on those tags, I would assume they have their text themed (most likely so they can have multiple languages on the site).
    I don't know what you can do, if anything, to get around it. However, word to the wise, unless you own that site, you may be in danger of violating any copyrights or access restrictions the owner has by attempting to connect through your own means. Be careful.
    NOTE TO NEW PEOPLE LOOKING FOR HELP ON FORUM:

    When asking for help, please follow these guidelines to receive better and more prompt help:
    1. Put your code in Java Tags. To do this, put [highlight=java] before your code and [/highlight] after your code.
    2. Give full details of errors and provide us with as much information about the situation as possible.
    3. Give us an example of what the output should look like when done correctly.

    Join the Airline Management Simulation Game to manage your own airline against other users in a virtual recreation of the United States Airline Industry. For more details, visit: http://airlinegame.orgfree.com/

  3. #3
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,140
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: HttpURLConnection doesnt quite cut it

    Also posted at HttpURLConnection doesnt quite cut it - Dev Shed
    and
    http://www.java-forums.org/advanced-...quite-cut.html
    Last edited by Norm; August 23rd, 2012 at 02:17 PM.
    If you don't understand my answer, don't ignore it, ask a question.

Similar Threads

  1. Replies: 7
    Last Post: June 6th, 2012, 03:16 PM
  2. Passing session ID over HttpURLConnection
    By zuzacat in forum What's Wrong With My Code?
    Replies: 1
    Last Post: June 20th, 2011, 09:18 AM
  3. HttpURLConnection null pointer exception
    By chopficaro in forum Java Theory & Questions
    Replies: 0
    Last Post: May 10th, 2010, 10:19 AM
  4. i can run my program but the math doesnt come otu
    By pairenoid in forum What's Wrong With My Code?
    Replies: 0
    Last Post: May 7th, 2010, 01:39 PM
  5. java.net.HttpURLConnection:large file to upload
    By tommy_725 in forum Java Networking
    Replies: 1
    Last Post: October 28th, 2009, 11:53 AM