예제 #1
0
                self.send_tweet(contructed_tweet)
            else:
                exit()

                # confirm send this tweet?
                # if yes: send_tweet(constructed_message returned from def constructed_message)
                # if not: cancel
        else:
            print("There are no recruiters")
            exit()


def insert_in_database(user, id_tweet, message, date):
    query_user = SentDate.create(user_sent=user,
                                 tweet_sent_message=message,
                                 date_tweet_sent=date)
    query_user.save()


user, ck, cs, at, atc = [
    line.rstrip('\n') for line in open('my_twitter_info.txt', 'r')
]
print("the user is", user)
twitter = retrive_twitter_info.GetTwitterInfo(ck, cs, at, atc, user)
print("antes de procesar archivo")
db = SqliteDatabase('recruited.db')
db.connect()
# insert_in_database(44973121,995,"just python5",datetime.datetime.now())
new_target = target(twitter, db, user)
new_target.send_tweet_to_recruited()
예제 #2
0
#auth1.set_access_token(access_token1, access_token_secret1)
#api1 = tweepy.API(auth1)

#climategames1
user1 = "climategames1"
consumer_key1 = "BbgIVypKy3NJi9hGK03ywiFTD"
consumer_secret1 = "0bQsTvk5a5u0rMksBdIl6Vh9jMdi27cXTzQfFtzmPnifP6fYXO"
access_token1 = "4331388381-DYASi2x8Q5KTRuXPxeQThyhkXece5aEMtuTHiKX"
access_token_secret1 = "sGdCmfc02YxA78odDXJUZ7oejNbFoYMwleollgHc415jt"
auth1 = tweepy.OAuthHandler(consumer_key1, consumer_secret1)
auth1.set_access_token(access_token1, access_token_secret1)
api1 = tweepy.API(auth1)

climategames1 = retrive_twitter_info.GetTwitterInfo(consumer_key1,
                                                    consumer_secret1,
                                                    access_token1,
                                                    access_token_secret1,
                                                    user1)

#climategames2
user2 = "climategames2"
consumer_key2 = "JVKqhuoG4lZOrzsk8prDGDPzw"
consumer_secret2 = "KBj0TqI74kitjQy5H3t3XgEx11WUJlpx0NFsJEYRdT3tVUW6Sz"
access_token2 = "4331461101-ssMkvdGD04vpkJLyebnqT1mMz4IUYbNTTAyh50C"
access_token_secret2 = "JkRc7uQmXPHk3axKVhkIshJ9kCXTwGORXvIjv64NAP8gz"
auth2 = tweepy.OAuthHandler(consumer_key2, consumer_secret2)
auth2.set_access_token(access_token2, access_token_secret2)
api2 = tweepy.API(auth2)

climategames2 = retrive_twitter_info.GetTwitterInfo(consumer_key2,
                                                    consumer_secret2,
예제 #3
0
import retrive_twitter_info
import time

#climategames1
user1 = "climategames1"
consumer_key1 = "BbgIVypKy3NJi9hGK03ywiFTD"
consumer_secret1 = "0bQsTvk5a5u0rMksBdIl6Vh9jMdi27cXTzQfFtzmPnifP6fYXO"
access_token1 = "4331388381-DYASi2x8Q5KTRuXPxeQThyhkXece5aEMtuTHiKX"
access_token_secret1 = "sGdCmfc02YxA78odDXJUZ7oejNbFoYMwleollgHc415jt"
auth1 = tweepy.OAuthHandler(consumer_key1, consumer_secret1)
auth1.set_access_token(access_token1, access_token_secret1)
api1 = tweepy.API(auth1)

climategames1 = retrive_twitter_info.GetTwitterInfo(consumer_key1,
                                                    consumer_secret1,
                                                    access_token1,
                                                    access_token_secret1,
                                                    user1)

#climategames2
user2 = "climategames2"
consumer_key2 = "JVKqhuoG4lZOrzsk8prDGDPzw"
consumer_secret2 = "KBj0TqI74kitjQy5H3t3XgEx11WUJlpx0NFsJEYRdT3tVUW6Sz"
access_token2 = "4331461101-ssMkvdGD04vpkJLyebnqT1mMz4IUYbNTTAyh50C"
access_token_secret2 = "JkRc7uQmXPHk3axKVhkIshJ9kCXTwGORXvIjv64NAP8gz"
auth2 = tweepy.OAuthHandler(consumer_key2, consumer_secret2)
auth2.set_access_token(access_token2, access_token_secret2)
api2 = tweepy.API(auth2)

climategames2 = retrive_twitter_info.GetTwitterInfo(consumer_key2,
                                                    consumer_secret2,