Я использую пакет Twitter Python, который устанавливается
easy_install twitter
Пакет можно найти по адресу: 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