Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Tweaking sample usage

  • Loading branch information...
commit 44764b9ea8a7ecb3497315fadcb6865a50d15d7c 1 parent 025c709
@ptwobrussell authored
Showing with 3 additions and 2 deletions.
  1. +3 −2 recipe__extract_tweet_entities.py
View
5 recipe__extract_tweet_entities.py
@@ -9,6 +9,7 @@ def get_entities(tweet):
# Note: the production Twitter API contains a few additional fields in
# the entities hash that would require additional API calls to resolve
+ # See API resources that offer the include_entities parameter for details.
entities = {}
entities['user_mentions'] = []
@@ -38,7 +39,7 @@ def get_entities(tweet):
tweets = \
[
{
- 'text' : 'RT @ptwobrussell: Generating Dynamic Social Networks from Large Scale Unstructured Data...'
+ 'text' : 'Get @SocialWebMining example code at http://bit.ly/biais2 #w00t'
# ... more tweet fields ...
@@ -49,6 +50,6 @@ def get_entities(tweet):
]
for tweet in tweets:
- tweet['entities'] = getEntities(tweet)
+ tweet['entities'] = get_entities(tweet)
print json.dumps(tweets, indent=1)
Please sign in to comment.
Something went wrong with that request. Please try again.