Improved twitter search on website.
This commit is contained in:
parent
57e7db8b37
commit
33bb6dec37
2 changed files with 3 additions and 3 deletions
|
|
@ -64,7 +64,7 @@ class SearchQuery(object):
|
||||||
return False
|
return False
|
||||||
rv = json.load(urllib2.urlopen(self.get_url()))
|
rv = json.load(urllib2.urlopen(self.get_url()))
|
||||||
return [SearchResult(x) for x in rv['results'] if
|
return [SearchResult(x) for x in rv['results'] if
|
||||||
_accept(x['text'])]
|
_accept(x['from_user'] + u': ' + x['text'])]
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def up_to_date(self):
|
def up_to_date(self):
|
||||||
|
|
|
||||||
|
|
@ -10,8 +10,8 @@ tweets = twitter.SearchQuery(required=['flask'],
|
||||||
optional=['code', 'web', 'python', 'py',
|
optional=['code', 'web', 'python', 'py',
|
||||||
'pocoo', 'micro', 'mitsuhiko',
|
'pocoo', 'micro', 'mitsuhiko',
|
||||||
'framework', 'django', 'jinja',
|
'framework', 'django', 'jinja',
|
||||||
'werkzeug', 'pylons'],
|
'werkzeug', 'documentation',
|
||||||
lang='en')
|
'app'])
|
||||||
|
|
||||||
|
|
||||||
@general.route('/')
|
@general.route('/')
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue