def get_value_from_api(self, url, args={}, method='GET'):
        params = {
            'user_api_key': settings.DISQUS_USER_API_KEY,
            'api_version': '1.1',
        }
        params.update(args)

        # clean up the values
        for key, val in params.items():
            if isinstance(val, (str, unicode)):
                params[key] = NONPRINTABLE_RE.sub('', val)

        data = urllib.urlencode(params)
        additional = ''

        if method != 'POST':
            additional = data % '?%s'
            data = None

        url = 'http://disqus.com/api/%s/%s' % (url, additional)
        try:
            handle = urllib2.urlopen(url, data)
        except urllib2.HTTPError, err:
            print 'Failed to %s %s with args %s' % (method, url, args)
            return None
        else:
            json_obj = json.loads(handle.read())['message']
            handle.close()

            return json_obj
dataset/ETHPy150Open codekoala/django-articles/articles/management/commands/convert_comments_to_disqus.py/Command.get_value_from_api/swapped operands of `%`