Re: Html download challenge



On Thu, 30 Jun 2005 10:46:47 -0400, "Paul Battersby"
<batman42ca@xxxxxxxx> wrote:

>That would be my guess, yes. The secret that I have been unable to uncover
>is what properties do I need to set to make it work.

Exactly what he said. After you open the connection, set its request
property "User-Agent" to anything you want that doesn't contain "Java"
in it (I tried conn.setRequestProperty("User-Agent", "Paul") and it
worked.

I don't know what you are trying to do, but I just started using this
package, it is handy (and saves you some time/headaches):
http://sourceforge.net/projects/htmlparser

Darko

>
>"Tor Iver Wilhelmsen" <jadedgamer@xxxxxxxxxxx> wrote in message
>news:ull4rriv4.fsf@xxxxxxxxxxxxxx
>> "Paul Battersby" <batman42ca@xxxxxxxx> writes:
>>
>> > I figure I need to pass some sort of header information or something so
>that
>> > I appear to be a browser.
>>
>> So you are looking for URLConnection.setRequestProperty("User-Agent",
>> "some browser string").
>

.



Relevant Pages

  • Re: Html download challenge
    ... The secret that I have been unable to uncover ... >> I appear to be a browser. ... Prev by Date: ...
    (comp.lang.java.programmer)
  • Re: Ancient Secrets/Lost Technology
    ... I just finished reading The Da Vinci Code (alright, ... about it was the central Ancient Secret hidden in the book (I ... the protagonist or others must uncover, ... It is based on a supposed non-fiction book. ...
    (rec.arts.sf.written)
  • Re: Ancient Secrets/Lost Technology
    ... protagonist or others must uncover, ... secret of manufacturing. ... part of the fun of these books is not knowing the ... The Lost Art - from David Fickling Books ...
    (rec.arts.sf.written)
  • Re: Ancient Secrets/Lost Technology
    ... I just finished reading The Da Vinci Code (alright, ... Ancient Secret hidden in the book (I won't give it away, ... protagonist or others must uncover, ... it changes you ideas of our civilization. ...
    (rec.arts.sf.written)
  • Ancient Secrets/Lost Technology
    ... I just finished reading The Da Vinci Code (alright, ... Ancient Secret hidden in the book (I won't give it away, ... protagonist or others must uncover, ...
    (rec.arts.sf.written)