Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/hibernate/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
python twitter库速率限制检查_Python_Api_Python 2.7_Twitter - Fatal编程技术网

python twitter库速率限制检查

python twitter库速率限制检查,python,api,python-2.7,twitter,Python,Api,Python 2.7,Twitter,我试图通过使用rate_limit_remaining调用找出我的剩余费率限制,但它似乎无法正常工作。根据pydoc: class TwitterResponse(__builtin__.object) | Response from a twitter request. Behaves like a list or a string | (depending on requested format) but it has a few other interesting | attr

我试图通过使用rate_limit_remaining调用找出我的剩余费率限制,但它似乎无法正常工作。根据pydoc:

class TwitterResponse(__builtin__.object)
 |  Response from a twitter request. Behaves like a list or a string
 |  (depending on requested format) but it has a few other interesting
 |  attributes.
 |  
 |  `headers` gives you access to the response headers as an
 |  httplib.HTTPHeaders instance. You can do
 |  `response.headers.get('h')` to retrieve a header.
 |  
 |  Data descriptors defined here:
 |  
 |  __dict__
 |      dictionary for instance variables (if defined)
 |  
 |  __weakref__
 |      list of weak references to the object (if defined)
 |  
 |  rate_limit_limit
 |      The rate limit ceiling for that given request.
 |  
 |  rate_limit_remaining
 |      Remaining requests in the current rate-limit.
 |  
 |  rate_limit_reset
 |      Time in UTC epoch seconds when the rate limit will reset.

我的代码:


from twitter import *
t = Twitter(
    auth=OAuth('all the tokens'))

t.TwitterResponse.rate_limit_remaining