[GAE]urlfetchをshellから使ってみる
- December 19th, 2009
- Posted in Python
- Write comment
普通にやろうとすると以下のメッセージが表示されてしまって出来ない。
「AssertionError: No api proxy found for service “urlfetch”」
ということで、どうすればいいかのメモ。
from google.appengine.api import apiproxy_stub_map, urlfetch_stub
apiproxy_stub_map.apiproxy = apiproxy_stub_map.APIProxyStubMap()
apiproxy_stub_map.apiproxy.RegisterStub('urlfetch', urlfetch_stub.URLFetchServiceStub())
from google.appengine.api import urlfetch
urlfetch.fetch('http://www.google.co.jp').status_code
Popularity: 5% [?]
No comments yet.