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


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

Re: Getting filenotfound exception on instagram hashtag search query

Path csiph.com!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail
From Eric Sosman <esosman@comcast-dot-net.invalid>
Newsgroups comp.lang.java.programmer
Subject Re: Getting filenotfound exception on instagram hashtag search query
Date Wed, 9 Sep 2015 16:11:14 -0400
Organization A noiseless patient Spider
Lines 28
Message-ID <msq3lm$qpc$1@dont-email.me> (permalink)
References <84fd8a39-ee73-4567-b65f-ca61f2d6773c@googlegroups.com>
Mime-Version 1.0
Content-Type text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding 7bit
Injection-Date Wed, 9 Sep 2015 20:09:27 +0000 (UTC)
Injection-Info mx02.eternal-september.org; posting-host="858a9d65d95f4ea4d355bd116aa2cdbf"; logging-data="27436"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18Iz6X5ap35rE1QDIrfZnLw"
User-Agent Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0
In-Reply-To <84fd8a39-ee73-4567-b65f-ca61f2d6773c@googlegroups.com>
Cancel-Lock sha1:W9lXFhoWX/KjuINauzXJLvqh9wk=
Xref csiph.com comp.lang.java.programmer:32570

Show key headers only | View raw


On 9/9/2015 2:41 PM, Arnab Roy wrote:
> I am trying to run a program which search Instagram for pictures of specific hashtag. Below is my code for the program. When I am running the program, it is not showing any error, but it is returning "filenotfoundexception" from instagram. I think it is in the endpoint url, but I can't exactly figure out where I am making the mistake. Can anyone help me figuring it out? Thanks in advance

     I'm not familiar with Instagram nor with the API's you are
using to access it, but the error message seems clear enough.  Does

https://api.instagram.com/v1/tags/Query{query='india', lang='null', 
locale='null', maxId=-1, count=-1, since='null', sinceId=-1, 
geocode='null', until='null', resultType='null', 
nextPageQuery='null'}/media/recent?client_id=xxx

... look like a syntactically valid URL to you?

     I suspect the problem is caused by

>          Query query = new Query(params[0]);
>          String urlString = APIURL + "/"+ query +"/media/recent?client_id=" + INSTA_CONS_ID;
>                  URL url = new URL(urlString);

... where query.toString() is most likely producing all that junk
in the middle of your URL.  You probably want some other method of
query -- but, being unfamiliar with Query (it's probably not the
javax.management.Query class, but some "foreign import"), I don't
know what to suggest.

-- 
esosman@comcast-dot-net.invalid
"Don't be afraid of work. Make work afraid of you." -- TLM

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


Thread

Getting filenotfound exception on instagram hashtag search query Arnab Roy <royarnab89@gmail.com> - 2015-09-09 11:41 -0700
  Re: Getting filenotfound exception on instagram hashtag search query Eric Sosman <esosman@comcast-dot-net.invalid> - 2015-09-09 16:11 -0400

csiph-web