1
我使用的是由问题与Twitter包由sixohsix
easy_install twitter
软件包安装了一个Twitter的Python包,可以发现在:https://github.com/sixohsix/twitter
我遇到了一些奇怪的错误。
import twitter
twitter_search = twitter.Twitter(domain="search.twitter.com")
results = twitter_search.search(q="japan")
比我收到以下错误:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.6/dist-packages/twitter-1.6-py2.6.egg/twitter/api.py", line 150, in __call__
return self._handle_response(req, uri, arg_data)
File "/usr/local/lib/python2.6/dist-packages/twitter-1.6-py2.6.egg/twitter/api.py", line 165, in _handle_response
raise TwitterHTTPError(e, uri, self.format, arg_data)
twitter.api.TwitterHTTPError: Twitter sent status 404 for URL: 1/search.json using parameters: (q=japan)
details: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<title>The page you were looking for doesn't exist (404)</title>
<style type="text/css">
body { background-color: #fff; font-family: Helvetica, sans-serif; }
h1 { margin: 10px 0; }
img { border: 0; }
</style>
</head>
<body>
<a href="/"><img src="/images/search/twitter-logo-large.png"></a>
<h1>The page you were looking for doesn't exist.</h1>
<p>You may have mistyped the address or the page may have moved.</p>
</body>
</html>
我可以知道我究竟做错了什么?
我使用Ubuntu 10.04,Python 2.6中,并使用Twitter的1.6
哪些Twitter的Python绑定? – 2011-04-02 07:34:51
可能是一个bug,也许在这里报告https://github.com/sixohsix/twitter/issues – 2011-04-04 17:53:37