Permalink
Browse files

Merge pull request #2 from umbrae/patch-1

If the endpoint URL already had URL parameters, use an ampersand instead.
  • Loading branch information...
2 parents de4ef62 + 0d69856 commit db8cf4c073b620aa9568f6b4fac841500989fae2 @abarmat committed Jun 9, 2012
Showing with 4 additions and 1 deletion.
  1. +4 −1 oembed/__init__.py
View
@@ -303,7 +303,10 @@ def request(self, url, **opt):
urlApi = self._urlApi.replace('{format}', params['format'])
del params['format']
- return "%s?%s" % (urlApi, urllib.urlencode(params))
+ if '?' in urlApi:
+ return "%s&%s" % (urlApi, urllib.urlencode(params))
+ else:
+ return "%s?%s" % (urlApi, urllib.urlencode(params))
def get(self, url, **opt):
'''

0 comments on commit db8cf4c

Please sign in to comment.