fixed an issue pointed out by impshun

This commit is contained in:
Dionysus 2020-04-09 22:06:32 -04:00
parent 010429dae4
commit 8e8a04353f
Signed by: acidvegas
GPG Key ID: EF4B922DB85DC9DE
3 changed files with 14 additions and 7 deletions

View File

@ -1,6 +1,6 @@
ISC License
Copyright (c) 2019, acidvegas <acid.vegas@acid.vegas>
Copyright (c) 2020, acidvegas <acid.vegas@acid.vegas>
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above

View File

@ -1,24 +1,31 @@
###### Requirments
# chir.py
> twitter news bot that builds followers, posts, and bitcoin via ppc links
## Requirments
* [FeedParser](http://pypi.python.org/pypi/feedparser)
* [Tweepy](http://pypi.python.org/pypi/tweepy)
* [ndg-httpsclient](http://pypi.python.org/pypi/ndg-httpsclient) *(Install only if you are getting an "InsecurePlatformWarning" error.)*
###### Instructions
## Instructions
Register a Twitter account, and [sign up](http://dev.twitter.com/apps/new) for a new developer application.
Go to your new application settings "Keys and Access Tokens" tab.
Click the "Create Your Access Token" button on the bottom.
These will be used in the config to connect to your Twitter account.
Go to your new application settings "Permissions".
Change your access to "Read, Write and Access direct messages".
Register a [CoinURL](http://coinurl.com/) account and get your [api key](http://coinurl.com/profile-api.php).
The random number you will see after "uuid" is your unique user id that will be use in the config.
Edit your `config.py` and change the Twitter & CoinURL API settings.
###### Mirrors
## Mirrors
- [acid.vegas](https://acid.vegas/chir.py) *(main)*
- [SuperNETs](https://git.supernets.org/acidvegas/chir.py)
- [GitHub](https://github.com/acidvegas/chir.py)
- [GitLab](https://gitlab.com/acidvegas/chir.py)

View File

@ -40,12 +40,12 @@ class boost_loop(threading.Thread):
while True:
try:
if 'boost_tweet' in locals(): api.destroy_status(boost_tweet.id)
boost_tweet = api.update_status('Support our Twitter! #' + ' #'.join(config.boost))
boost_tweet = api.update_status('Support our Twitter! #' + ' #'.join(config.boost_keywords))
debug.alert('Re-posted boost tweet.')
except tweepy.TweepError as ex:
debug.error('Error occured in the boost loop', ex)
finally:
random.shuffle(config.boost)
random.shuffle(config.boost_keywords)
time.sleep(60*5)
class favorite_loop(threading.Thread):