Merge
This commit is contained in:
parent
8c00ece7bd
commit
b06fe841ae
12
setup.py
12
setup.py
|
@ -65,13 +65,21 @@ db.closeConnection()
|
||||||
|
|
||||||
config.add_section("Twitter")
|
config.add_section("Twitter")
|
||||||
|
|
||||||
cke = "V6ekVFYtavi6IvRFLS0dHifSh"
|
print('''We are going to need a consumer key and consumer secret for accessing Twitter.
|
||||||
cse = "U2duSfBtW0Z8UQFoJyARf3jU80gdQ44EEqWqC82ebuGbIPN3t7"
|
If you don't have this yet, go to apps.twitter.com and create a new application. This
|
||||||
|
application will need read/write access as well as access to direct messages.''')
|
||||||
|
|
||||||
|
cke = input("Consumer key: ")
|
||||||
|
cse = input("Consumer secret: ")
|
||||||
|
|
||||||
config.set("Twitter", "cke", cke)
|
config.set("Twitter", "cke", cke)
|
||||||
config.set("Twitter", "cse", cse)
|
config.set("Twitter", "cse", cse)
|
||||||
|
|
||||||
auth = tweepy.OAuthHandler(cke, cse)
|
auth = tweepy.OAuthHandler(cke, cse)
|
||||||
|
try:
|
||||||
|
auth = tweepy.OAuthHandler(cke, cse)
|
||||||
|
except tweepy.TweepError:
|
||||||
|
print("Failed to authenticate with Twitter. Please check your consumer key and secret.")
|
||||||
|
|
||||||
try:
|
try:
|
||||||
authurl = auth.get_authorization_url()
|
authurl = auth.get_authorization_url()
|
||||||
|
|
Loading…
Reference in a new issue