Fixing and closing issue #15 by ebertti - getFollowersStatus() fails when only checking with ID, needs proper query string stuff.
This commit is contained in:
parent
7dbbd954b2
commit
d630e02b6e
1 changed files with 7 additions and 3 deletions
|
|
@ -572,10 +572,14 @@ class setup:
|
|||
if screen_name is not None:
|
||||
apiURL = "http://api.twitter.com/%d/statuses/followers.json?screen_name=%s" % (version, screen_name)
|
||||
try:
|
||||
if page is not None:
|
||||
return simplejson.load(self.opener.open(apiURL + "&page=%s" % page))
|
||||
if apiURL.find("?") == -1:
|
||||
apiURL += "?"
|
||||
else:
|
||||
return simplejson.load(self.opener.open(apiURL + "&cursor=%s" % cursor))
|
||||
apiURL += "&"
|
||||
if page is not None:
|
||||
return simplejson.load(self.opener.open(apiURL + "page=%s" % page))
|
||||
else:
|
||||
return simplejson.load(self.opener.open(apiURL + "cursor=%s" % cursor))
|
||||
except HTTPError, e:
|
||||
raise TwythonError("getFollowersStatus() failed with a %s error code." % `e.code`, e.code)
|
||||
else:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue