Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Patched it up so now it works

  • Loading branch information...
commit 98b9d2ede4f78f5f4410913e15c4029c82625f89 1 parent 5c4cfb4
@sixohsix authored
Showing with 4 additions and 5 deletions.
  1. +4 −5 twitter/api.py
View
9 twitter/api.py
@@ -64,12 +64,10 @@ def __call__(self, **kwargs):
headers = {}
if (self.agent):
headers["X-Twitter-Client"] = self.agent
- if (self.username):
- headers["Authorization"] = "Basic " + b64encode("%s:%s" %(
- self.username, self.password))
kwargs = {
- "uri": "%s.%s%s" % (self.uri,self.format,argStr),
+ "uri": "http://%s%s.%s%s" % (
+ self.domain, self.uri, self.format, argStr),
"method": method
}
@@ -81,7 +79,8 @@ def __call__(self, **kwargs):
try:
http = Http()
- http.add_credentials(self.username, self.password, self.domain)
+ if (self.username):
+ http.add_credentials(self.username, self.password, self.domain)
response, content = http.request(**kwargs)
if (response.status == 304):
return []
Please sign in to comment.
Something went wrong with that request. Please try again.