Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #35163

Re: Q) Why is URLConnection not downloading all the renderable content for me?

Path csiph.com!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From Stanimir Stamenkov <s7an10@netscape.net>
Newsgroups comp.lang.java.programmer
Subject Re: Q) Why is URLConnection not downloading all the renderable content for me?
Date Tue, 2 Aug 2016 07:50:25 +0300
Organization A noiseless patient Spider
Lines 27
Message-ID <nnp8qg$rec$1@dont-email.me> (permalink)
References <925a87d0-661e-4670-84e4-a9d2b9f9ea89@googlegroups.com>
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding 7bit
Injection-Date Tue, 2 Aug 2016 04:50:24 -0000 (UTC)
Injection-Info mx02.eternal-september.org; posting-host="c09fc6f411bf9a35d35f3e1e580a61b6"; logging-data="28108"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/euwAIScmH1efWWCo0+mf3"
User-Agent Mozilla/5.0 (Windows NT 10.0; WOW64; rv:43.0) Gecko/20100101 Firefox/43.0 SeaMonkey/2.40
In-Reply-To <925a87d0-661e-4670-84e4-a9d2b9f9ea89@googlegroups.com>
X-Face "@)%Vlap6d%OVYDS}B4YUWE@yUy+^!w/+.q.,c5kjI#+uG?kYP&r/pTjNWgo:g[A,O=AL3/ j&4Le2cau$<e=FPq~GbeZ6DW1Grey[VHn8?ktzvoQtzlg;]&rh8g]CD+_BC7d[gW{Yx&_X*4Q$h&nJ l@t(|4R4:T='&]U#ui+z9OC$.~gJjU93kh:Ojc$Cz0n#I9!~!9ay?E<UlW&5,IFX1*KtA>MYEFst$y y"m]M7tq\S(>[a$x0x8%S
Cancel-Lock sha1:2h1EGCLs5aVMVf2MfrHNUp6i7W8=
Xref csiph.com comp.lang.java.programmer:35163

Show key headers only | View raw


Sun, 31 Jul 2016 09:29:44 -0700 (PDT), sandeep6699@yahoo.com:

> I am using URLConnection to download the contents of the following URL in my Java program:
>
> http://www.pollutionequipmentdirectory.com/category/air?Page=2
>
> My code snippet is as follows:
>
> [...]
> 	URLConnection urlConnection = url.openConnection();
> [...]
>
> However, I am finding that URLConnection does not download the content that I can see if I save the contents of the browser (Chrome in my case).
> [...]
>
> Any suggestions would be welcome?

http://docs.oracle.com/javase/8/docs/api/java/net/HttpURLConnection.html#setFollowRedirects-boolean-

     if (urlConnection instanceof HttpURLConnection) {
         HttpURLConnection httpConnection = (HttpURLConnection) 
urlConnection;
         httpConnection.setFollowRedirects(true);
     }

-- 
Stanimir

Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Q) Why is URLConnection not downloading all the renderable content for me? sandeep6699@yahoo.com - 2016-07-31 09:29 -0700
  Re: Q) Why is URLConnection not downloading all the renderable content for me? Stanimir Stamenkov <s7an10@netscape.net> - 2016-08-02 07:50 +0300
    Re: Q) Why is URLConnection not downloading all the renderable content for me? Stanimir Stamenkov <s7an10@netscape.net> - 2016-08-02 07:53 +0300
    Re: Q) Why is URLConnection not downloading all the renderable content for me? Stanimir Stamenkov <s7an10@netscape.net> - 2016-08-03 09:21 +0300
    Re: Q) Why is URLConnection not downloading all the renderable content for me? Roedy Green <inquiry@mindprod.com> - 2016-08-03 18:38 -0700
  Re: Q) Why is URLConnection not downloading all the renderable content for me? Martin Gregorie <martin@address-in-sig.invalid> - 2016-08-02 10:19 +0000

csiph-web