URLFetch API Response 400

已查看 142 次
跳至第一个未读帖子

Prateek Malhotra

未读,
2008年6月22日 18:19:462008/6/22
收件人 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

未读,
2008年6月22日 18:27:572008/6/22
收件人 google-a...@googlegroups.com
Want to show us the code?

--

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

Prateek Malhotra

未读,
2008年6月22日 18:34:012008/6/22
收件人 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
回复全部
回复作者
转发
0 个新帖子