Skip to content

Commit c77b50b

Browse files
committed
Add shell-search.py example
1 parent f15b976 commit c77b50b

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

Examples/shell-search.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/usr/bin/env python
2+
# encoding: utf-8
3+
import sys
4+
from loklak import Loklak
5+
6+
query = sys.argv[1]
7+
l = Loklak()
8+
print("Retrieving Tweets...")
9+
tweets = l.search(query)
10+
11+
for tweet in tweets['statuses']:
12+
print('@'+str(tweet['screen_name'])+': '+str(tweet['text']))

0 commit comments

Comments
 (0)