Ejemplo n.º 1
0
def build_Edo():
    email_password = getpass.getpass('Insert password for ' +email_email +':') # password input via getpass
    edoBot = TwitterBot(email_email,email_password,0,0,keywords,0) #create the bot
    network_status = check_connection()
    if (not network_status):
        usage.print_usage(6) # if the network connection isn't active
    authenticated = edoBot.login()  # login
    if(authenticated): 
        if(check_user.check_if_user_exists(edoBot.username,edoBot.password)):
            print('Welcome back, ' + edoBot.username + ' !')
        else:
            print('Logged in as '+edoBot.username+' !')
    return edoBot
Ejemplo n.º 2
0
def build_Edo():
    email_password = getpass.getpass("Insert password for " + email_email +
                                     ":")  # password input via getpass
    edoBot = TwitterBot(email_email, email_password, 0, 0, keywords,
                        0)  # create the bot
    network_status = check_connection()
    if not network_status:
        usage.print_usage(6)  # if the network connection isn't active
    authenticated = edoBot.login()  # login
    if authenticated:
        if check_user.check_if_user_exists(edoBot.username, edoBot.password):
            print("Welcome back, " + edoBot.username + " !")
        else:
            print("Logged in as " + edoBot.username + " !")
    return edoBot
Ejemplo n.º 3
0
                    result = " | likes: " + str(self.likes)+' | '+"retweets: " + str(self.retweets)
                    print(str(datetime.datetime.now())[:-7] + result,end='\r')
                    time.sleep(self.generate_random())
                except Exception as ex:
                    time.sleep(15)
        print('')
        print('Finished!')

email_password = getpass.getpass('Insert password for ' +email_email +':') # password input via getpass

# if password, username, and ( -m OR -h)
if((email_email!='')and(email_password!='')and(not stat_flag)and((my_flag and (not hashtag_flag))or(hashtag_flag and (not my_flag)))):
    edoBot = TwitterBot(email_email,email_password,0,0,hashtags,0) #create the bot
    authenticated = edoBot.login()  # login
    if(authenticated): 
        if(check_user.check_if_user_exists(edoBot.username,edoBot.password)):
            print('Welcome back, ' + edoBot.username + ' !')
        else:
            print('Logged in as '+edoBot.username+' !')
        if(hashtag_flag and(not my_flag)):
            edoBot.add_links()
        elif(my_flag and(not hashtag_flag)):
            edoBot.add_links_my_home()
        else:
            usage.print_usage(0)
        edoBot.crawl() #here start the bot
        edoBot.close()
        timee = datetime.datetime.now()
        add_result.add_stat(edoBot.username,timee,edoBot.likes,edoBot.retweets,edoBot.followers)
# if password, username and -s 
elif((email_email!='')and(not password_flag)and(not hashtag_flag)and(stat_flag)and(not my_flag)):