Re: Html download challenge
- From: Darko Aleksic <aleksicd@xxxxxxxxxxxxxxxx>
- Date: Thu, 30 Jun 2005 13:11:54 -0600
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").
>
.
- References:
- Html download challenge
- From: Paul Battersby
- Re: Html download challenge
- From: Tor Iver Wilhelmsen
- Re: Html download challenge
- From: Paul Battersby
- Html download challenge
- Prev by Date: Re: javaservice not starting service on reboot
- Next by Date: Re: JFrame Resize Issues
- Previous by thread: Re: Html download challenge
- Next by thread: Re: Html download challenge
- Index(es):
Relevant Pages
|