-
Notifications
You must be signed in to change notification settings - Fork 490
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mining the Social Web, Second Edition #78
Comments
I may be missing something, but from briefly inspecting the code again, I'm having a hard time identifying how this could happen. If the code in the "try" block fails, then it should break you out of the loop, avoiding the line of code in question that references "next_results" Are you sure that your indentation level is correct? I can't tell from what you pasted in if you're running the code from in the notebook as-is or if you've typed it in and may have inadvertently adjusted indent levels. I can think about this some more, but just wanted to check back first on how you are executing the code. On Jul 9, 2014, at 3:18 AM, agarwalkushal25 [email protected] wrote:
|
I am totally lost, in trying to install a virtual machine. I do not know how to get to the screen, I follow until you get to step three on installing code on gitclone and goblin. I do not know how you get to that screen and get that code to run. I have osX on Mac. I installed github Please help!!1 |
The screen that you see there is called a terminal. If you are on OS X, you On Wed, Sep 10, 2014 at 9:35 AM, Drlenita [email protected] wrote:
|
On pages 25-26, there is this code:
q = '#MentionSomeoneImportantForYou'
count = 100
search_results = twitter_api.search.tweets(q=q, count=count)
twitter_api is predefined and is working fine.
statuses = search_results['statuses']
for _ in range(5):
print "Length of statuses", len(statuses)
try:
next_results = search_results['search_metadata']['next_results']
except KeyError, e: # No more results when next_results doesn't exist
break
kwargs = dict([ kv.split('=') for kv in next_results[1:].split("&") ])
The last code throws an error that 'next_results' is not defined.
The text was updated successfully, but these errors were encountered: