次のように、この可読性 APIにテキストを渡そうとしています。
text = 'this reminds me of the Dutch 2001a caravan full of smoky people Auld Lang Syne'
# construct Readability Metrics API url
request_url = 'http://ipeirotis.appspot.com/readability/GetReadabilityScores?format=json&text=%s' % text
request_url = urllib.quote_plus(request_url.encode('utf-8'))
# make request
j = json.load(urllib.urlopen(request_url))
ただし、最後の行でこのエラーが発生します。
[Errno 2] そのようなファイルまたはディレクトリはありません: 'http://ipeirotis.appspot.com/readability/GetReadabilityScores?format=json&text=this+reminds+me+of+the+Dutch+2001a+caravan+full+of+smoky +人+Auld+Lang+Syne'
ただし、エラーの URL は有効であり、アクセスすると応答が返されます。urlopen を使用できるように URL をエンコードするにはどうすればよいですか? どうもありがとう。