diff --git a/README.md b/README.md index 59a5a15172579aa3450ea895f38c138e2cb80dc9..255c2b1d08d3d3a0f785ef9fc166f0ade4c8119e 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ Make all other modifications to the accounts you would like to interact with, an You will need the [Requests](http://www.python-requests.org/en/latest/), [Requests-OAuthlib](https://requests-oauthlib.readthedocs.io/en/latest/), and [BeautifulSoup](https://www.crummy.com/software/BeautifulSoup/) libraries. If you have [Pipenv](https://pipenv.readthedocs.io/en/latest/), you can install them by running the command ```pipenv install``` inside the folder; otherwise, run ```pip install -r requirements.txt```. -Add your API keys and access tokens to your environmental variables by following [these instructions](https://java.com/en/download/help/path.xml). Then, just run ```python xkcd_alt.py``` in your command line and let it run! The bot respects the Twitter API limits, and will run every 60 seconds as long as the command line is open. +Add your API keys and access tokens to your environmental variables by following [these instructions](https://java.com/en/download/help/path.xml). Then, just run ```python xkcd_alt.py``` in your command line and let it run! The bot respects the Twitter API limits, and will run every 15 seconds as long as the command line is open. ### --> Running on Heroku @@ -45,7 +45,7 @@ $ git push heroku master $ heroku ps:scale worker=1 ``` -You should also install the [Logentries addon](https://elements.heroku.com/addons/logentries) to notify yourself of errors or crashes. The standard pattern for error messages is ```Entering log protection mode.``` +The program will now run once every 15 seconds. You should also install the [Logentries addon](https://elements.heroku.com/addons/logentries) to notify yourself of errors or crashes. The standard pattern for error messages is ```Entering log protection mode.``` ## Forks and Contributing diff --git a/xkcd_alt.py b/xkcd_alt.py index 7fcd4fb99c380c2a33043c516dada2b289725207..e4dcf33b5dae61d9e25f61419fd1c0734c0be9a4 100644 --- a/xkcd_alt.py +++ b/xkcd_alt.py @@ -211,8 +211,8 @@ while True: # Initialize main account loop if original_tweet == 'crash': crash() elif original_tweet is None: - print('No new comics found. Sleeping for 60 seconds...') - time.sleep(60) + print('No new comics found. Sleeping for 15 seconds...') + time.sleep(15) continue else: # Retrieve text [body, num_tweets] = retrieve_text(original_tweet['entities']['urls'][0]['expanded_url']) @@ -228,6 +228,6 @@ while True: # Initialize main account loop else: # Successful Tweet del result - print('Sleeping for 60 seconds...') - time.sleep(60) + print('Sleeping for 15 seconds...') + time.sleep(15) continue \ No newline at end of file