import tweepy

from .constants import TWITTER_ACCESS, TWITTER_SECRET
from .constants import TWITTER_CONSUMER_ACCESS, TWITTER_CONSUMER_SECRET

_auth = tweepy.OAuthHandler(TWITTER_CONSUMER_ACCESS, TWITTER_CONSUMER_SECRET)
_auth.set_access_token(TWITTER_ACCESS, TWITTER_SECRET)

twitter_client = tweepy.API(_auth)

import tweepy

from .constants import TWITTER_ACCESS, TWITTER_SECRET
from .constants import TWITTER_CONSUMER_ACCESS, TWITTER_CONSUMER_SECRET

_auth = tweepy.OAuthHandler(TWITTER_CONSUMER_ACCESS, TWITTER_CONSUMER_SECRET)
_auth.set_access_token(TWITTER_ACCESS, TWITTER_SECRET)

twitter_client = tweepy.API(_auth, wait_on_rate_limit=True)


Set wait on rate limit to True
Set wait on rate limit to True

  import tweepy
  
  from .constants import TWITTER_ACCESS, TWITTER_SECRET
  from .constants import TWITTER_CONSUMER_ACCESS, TWITTER_CONSUMER_SECRET
  
  _auth = tweepy.OAuthHandler(TWITTER_CONSUMER_ACCESS, TWITTER_CONSUMER_SECRET)
  _auth.set_access_token(TWITTER_ACCESS, TWITTER_SECRET)
  
- twitter_client = tweepy.API(_auth)
+ twitter_client = tweepy.API(_auth, wait_on_rate_limit=True)
  
+ 
Set wait on rate limit to True
## Code Before:
import tweepy

from .constants import TWITTER_ACCESS, TWITTER_SECRET
from .constants import TWITTER_CONSUMER_ACCESS, TWITTER_CONSUMER_SECRET

_auth = tweepy.OAuthHandler(TWITTER_CONSUMER_ACCESS, TWITTER_CONSUMER_SECRET)
_auth.set_access_token(TWITTER_ACCESS, TWITTER_SECRET)

twitter_client = tweepy.API(_auth)

## Instruction:
Set wait on rate limit to True
## Code After:
import tweepy

from .constants import TWITTER_ACCESS, TWITTER_SECRET
from .constants import TWITTER_CONSUMER_ACCESS, TWITTER_CONSUMER_SECRET

_auth = tweepy.OAuthHandler(TWITTER_CONSUMER_ACCESS, TWITTER_CONSUMER_SECRET)
_auth.set_access_token(TWITTER_ACCESS, TWITTER_SECRET)

twitter_client = tweepy.API(_auth, wait_on_rate_limit=True)

