Source

comofas / comofas_sequencia.py

#! /usr/bin/env python
# -*- coding: utf-8 -*-

from comofas_questions import ComofasQuestions
from comofas_answers import ComofasAnswers
from comofas_twitterer import ComofasTwitterer
from pynswers.Answers import Answers
from twitter import twitter

from comofas_credentials import *
from comofas_settings import *

if __name__=='__main__':
    
    #Puxa questions
    twitter_api = twitter.Api(username=TWITTER_USERNAME, password=TWITTER_PASSWORD)

    questions = ComofasQuestions(twitter_connection = twitter_api)
    questions.update_questions()
    
    #Responde
    answers = Answers()
    answers.appid = answers_appid
    comofas = ComofasAnswers(answers_connection = answers)
    comofas.answer_tweets()

    #Posta
    comofas = ComofasTwitterer(twitter_connection = twitter_api)
    comofas.post_tweets()