Ejemplo n.º 1
0
def search(request):

    dot = dotTwitter()

    keywords = dot.keywords
    message = ""
    tweets = dot.searchTweets(keywords)
    status = dot.storeResults(tweets)
    message = dot.sendMessage(tweets)


    return render_to_response('search.html', {
        'tweets': tweets,
        'status': status,
        'message': message
    }, context_instance = RequestContext(request))
Ejemplo n.º 2
0
import os
os.environ["DJANGO_SETTINGS_MODULE"] = "dotTwitter.settings"

#from django.db import models
from datetime import datetime
#from django.conf import settings
#import urllib
#import urlparse
#import simplejson
#from main.models import Tweet
from helpers.dottwitter import dotTwitter


now = str(datetime.now())

dot = dotTwitter()

keywords = dot.keywords
message = ""
tweets = dot.searchTweets(keywords)
status = dot.storeResults(tweets)

# We are now disabling the actual sending of messages so we can aggregate climate change keywords
#message = dot.sendMessage(tweets)

print tweets
print status
print message


with open("output.txt", "a") as myfile: