gauravtyagi2777 / google-gdata

Automatically exported from code.google.com/p/google-gdata
0 stars 0 forks source link

Search in Blogger Error #508

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
In Query method of BloggerService occured an error. This method throws an 
exception with follow message: 

Exception:Execution of request returned unexpected result: 
http://blogsearch.google.com/blogsearch_feeds?q=brasilMovedPermanently

I'm searching the term "brasil".

The product version is the 1.8 of 5 may. This error started from 23 may in all 
of my searchs. I'm using the Windows 7 and .Net Framework 4.

Original issue reported on code.google.com by eduardo....@gmail.com on 25 May 2011 at 6:41

GoogleCodeExporter commented 8 years ago
More one example:

To search the "Argentina", it's returns:

Exception:Execution of request returned unexpected result: 
http://blogsearch.google.com/blogsearch_feeds?q=ArgentinaMovedPermanently

Original comment by eduardo....@gmail.com on 26 May 2011 at 4:51

GoogleCodeExporter commented 8 years ago
Hi Eduardo,

Thanks for reporting this issue, I'll perform more tests to reproduce it.

Original comment by ccherub...@google.com on 27 May 2011 at 7:03

GoogleCodeExporter commented 8 years ago
Eduardo,

The queryUri must be passed by your code to the BloggerQuery class, which is 
then passed to BloggerService.Query.
It looks like you are passing the wrong uri to those methods.
If you still haven't found the issue, please share your code with us so that I 
can check it.
Thanks

Claudio

Original comment by ccherub...@google.com on 9 Jun 2011 at 2:18

GoogleCodeExporter commented 8 years ago
Hi Claudio,

The problem is on the parse method. When the class going to parse the result, 
the framework throws an exception. I think that this problem is a new 
limitation of the Google API.

Original comment by eduardo....@gmail.com on 13 Jun 2011 at 11:22

GoogleCodeExporter commented 8 years ago
Can you share your code so that I can reproduce it?

Original comment by ccherub...@google.com on 13 Jun 2011 at 11:23

GoogleCodeExporter commented 8 years ago
  var service = new Service("blogger", ApplicationName);

            var query = new FeedQuery(string.Format("http://blogsearch.google.com/blogsearch_feeds?hl=pt-BR&lr=&q={0}&ie=utf-8&output=atom", text));

            var atomfeeds = service.Query(query);   <--- Exception!

Original comment by eduardo....@gmail.com on 13 Jun 2011 at 11:28

GoogleCodeExporter commented 8 years ago
Eduardo,

That feed url returns a MovedPermanently response and links to the new url, 
which has the following format:

http://www.google.com/search?hl=pt-BR&lr=&q={0}&ie=utf-8&tbm=blg&output=atom

The corresponding feed is parsed correctly when there are no special character 
encodings, such as with a few Portuguese characters.
I guess somewhere in the code the wrong encoding is enforced.

BTW, this is not related with the Blogger API, Google Blog Search is a 
different product which is not officially supported by this library.

If you want to propose a patch to fix this specific encoding issue, I'd be glad 
to review it and merge it into the project.
Thanks

Claudio

Original comment by ccherub...@google.com on 13 Jun 2011 at 3:41