Fix for issue #25, certain search queries not being properly encoded. Thanks to momander for pointing this out...
This commit is contained in:
parent
5f1d0d4e90
commit
931921be01
3 changed files with 5 additions and 5 deletions
|
|
@ -9,7 +9,7 @@
|
|||
"""
|
||||
|
||||
__author__ = "Ryan McGrath <ryan@venodesigns.net>"
|
||||
__version__ = "1.3.4"
|
||||
__version__ = "1.3.5"
|
||||
|
||||
import urllib.request, urllib.parse, urllib.error
|
||||
import urllib.request, urllib.error, urllib.parse
|
||||
|
|
@ -210,7 +210,7 @@ class Twython(object):
|
|||
|
||||
@staticmethod
|
||||
def constructApiURL(base_url, params):
|
||||
return base_url + "?" + "&".join(["%s=%s" %(Twython.unicode2utf8(key), Twython.unicode2utf8(value)) for (key, value) in params.items()])
|
||||
return base_url + "?" + "&".join(["%s=%s" %(Twython.unicode2utf8(key), urllib.parse.quote_plus(Twython.unicode2utf8(value))) for (key, value) in params.items()])
|
||||
|
||||
@staticmethod
|
||||
def shortenURL(url_to_shorten, shortener = "http://is.gd/api.php", query = "longurl"):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue