capybara/virtualenv/lib/python2.7/site-packages/amazon/api.py
def lookup(self, ResponseGroup="Large", **kwargs):
        """Lookup an Amazon Product.

        :return:
            An instance of :class:`~.AmazonProduct` if one item was returned,
            or a list of  :class:`~.AmazonProduct` instances if multiple
            items where returned.
        """ 
        response = self.api.ItemLookup(ResponseGroup=ResponseGroup, **kwargs)
        root = objectify.fromstring(response)
        if root.Items.Request.IsValid == 'False':
            code = root.Items.Request.Errors.Error.Code
            msg = root.Items.Request.Errors.Error.Message
            raise LookupException(
                "Amazon Product Lookup Error: '{0}', '{1}'".format(code, msg))
        if not hasattr(root.Items, 'Item'):
            raise AsinNotFound("ASIN(s) not found: '{0}'".format(
                etree.tostring(root, pretty_print=True)))
        if len(root.Items.Item) > 1:
            return [
                AmazonProduct(
                    item,
                    self.aws_associate_tag,
                    self,
                    region=self.region) for item in root.Items.Item
            ]
        else:
            return AmazonProduct(
                root.Items.Item,
                self.aws_associate_tag,
                self,
                region=self.region
            )
def lookup(self, ResponseGroup="Large", **kwargs):
        response = self.api.ItemLookup(ResponseGroup=ResponseGroup, **kwargs)
        root = objectify.fromstring(response)
        if root.Items.Request.IsValid == 'False':
            code = root.Items.Request.Errors.Error.Code
            msg = root.Items.Request.Errors.Error.Message
            raise LookupException(
                "Amazon Product Lookup Error: '{0}', '{1}'".format(code, msg))
        if not hasattr(root.Items, 'Item'):
            raise AsinNotFound("ASIN(s) not found: '{0}'".format(
                etree.tostring(root, pretty_print=True)))
        if len(root.Items.Item) > 1:
            return [
                AmazonProduct(
                    item,
                    self.aws_associate_tag,
                    self,
                    region=self.region) for item in root.Items.Item
            ]
        else:
            return AmazonProduct(
                root.Items.Item,
                self.aws_associate_tag,
                self,
                region=self.region
            )
def lookup ( self , ResponseGroup = "Large" , * * kwargs ) : response = self . api . ItemLookup ( ResponseGroup = ResponseGroup , * * kwargs ) root = objectify . fromstring ( response ) if root . Items . Request . IsValid == 'False' : code = root . Items . Request . Errors . Error . Code msg = root . Items . Request . Errors . Error . Message raise LookupException ( "Amazon Product Lookup Error: '{0}', '{1}'" . format ( code , msg ) ) if not hasattr ( root . Items , 'Item' ) : raise AsinNotFound ( "ASIN(s) not found: '{0}'" . format ( etree . tostring ( root , pretty_print = True ) ) ) if len ( root . Items . Item ) > 1 : return [ AmazonProduct ( item , self . aws_associate_tag , self , region = self . region ) for item in root . Items . Item ] else : return AmazonProduct ( root . Items . Item , self . aws_associate_tag , self , region = self . region )
Lookup an Amazon Product.

        :return:
            An instance of :class:`~.AmazonProduct` if one item was returned,
            or a list of  :class:`~.AmazonProduct` instances if multiple
            items where returned.
Lookup an Amazon Product .