Google search has json-p interface which is used for ajax search api. But the term of use of the data and protocol is very restrictive.
http://googleajaxsearchapi.blogspot.com/ On Oct 14, 3:35 am, Nishu <[EMAIL PROTECTED]> wrote: > Thanks for replying > > Actually the html data that I am parsing is being rendered with UTF-8 > encoding so I tried setting the default encoding as UTF-8. Just for > your information I would like to tell you that I am trying to parse > google's search results which is rendered with UTF-8 encoding. Is > there any other way to get google's search result instead of parsing > the HTML, some API which can be used with Python. > > Your reply is highly appreciated but I will be thankful to you if you > can send me some code snippet or link to some other sources where I > can get more clear solution to my original problem. > > Thanks > Nishant > > On Oct 14, 12:13 pm, yejun <[EMAIL PROTECTED]> wrote: > > > iso8859-1 should be able to decode any char, but I guess there's a bug > > in code which caused implicit unicode conversion. > > > On Oct 14, 12:44 am, Nishu <[EMAIL PROTECTED]> wrote: > > > > Hello, > > > > I am trying to develop a screen scraping application using the google > > > Webapp framework. The application parses the html output of some other > > > page to extract the required data and then forms a string out of these > > > data. Sometimes the application works well but at times the > > > application raises the following error: > > > > UnicodeDecodeError: 'ascii' codec can't decode byte 0x95 in > > > position 100: ordinal not in range(128) > > > > After googling around for some time I tried the following: > > > > sys.setdefaultencoding("UTF-8") > > > > As a result the default encoding was set to 'UTF-8' but even this did > > > not solve the problem and now the application raised the following > > > error: > > > > UnicodeDecodeError: 'utf8' codec can't decode byte.......... > > > > So please help me solve this problem. Thanking you in advance. > > > > Nishant --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~----------~----~----~----~------~----~------~--~---
