This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
USER = "your_twitter_user" | |
PASS = "your_twitter_pass" | |
if "your_twitter" in USER+PASS: | |
print "You didn't set your twitter username and password in the script!" | |
USER = raw_input("Username>") | |
PASS = raw_input("Password>") | |
import urllib2, json, base64, sys, os |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import urllib2, json, base64, sys, termios, tty, os | |
USER = "your_twitter_user" | |
PASS = "your_twitter_pass" | |
neg_filename = "negative.txt" | |
pos_filename = "postive.txt" | |
queries = ['awesome','beautiful','shit','fuck','android','iphone','blackberry','windows','linux','apple','google'] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import urllib2,httplib,re | |
def url_title(url,**kwargs): | |
title = None | |
request = urllib2.Request(url) | |
try: | |
response = urllib2.urlopen(request) | |
data = response.read() | |
except urllib2.HTTPError: | |
data = None |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import httplib,pycurl,json | |
from django.conf import settings | |
from tasks import ProcessTweet | |
QUERY="android" | |
class Twitter(): | |
default_retry_delay = 5 | |
def run(self,query): | |
self.buffer = "" |
NewerOlder