URLFetch API Response 400

142 wyświetlenia
Przejdź do pierwszej nieodczytanej wiadomości

Prateek Malhotra

nieprzeczytany,
22 cze 2008, 18:19:4622.06.2008
do Google App Engine
I am trying to scrape info from this URL:
http://news.google.com/news?hl=en&ned=us&ie=UTF-8&q="Company
Name"&btnG=Search&as_drrb=b&as_minm=05&as_mind=2&as_maxm=06&as_maxd=1

When i use it in the urlfetch.fetch() function, i get a "Your client
has issued a malformed or illegal request. (400 Bad Request)" response
from Google. I can go to google.com just fine, but when going to
news.google.com which the search terms predefined, i get that error,
does anybody have any ideas why?

Thanks

-Prateek

Brett Morgan

nieprzeczytany,
22 cze 2008, 18:27:5722.06.2008
do google-a...@googlegroups.com
Want to show us the code?

--

Brett Morgan http://brett.morgan.googlepages.com/

Prateek Malhotra

nieprzeczytany,
22 cze 2008, 18:34:0122.06.2008
do Google App Engine
Hey,

I figured it out, turns out if I don't replace the spaces in the
search term with '+' it craps out on me.

Thanks anyway guys!

-Prateek
Odpowiedz wszystkim
Odpowiedz autorowi
Przekaż
Nowe wiadomości: 0