试图获取亚马逊搜索的第一页结果

时间:2017-01-27 23:14:57

标签: python amazon-web-services amazon-product-api

我目前正在尝试让此查询仅返回结果的第一页。我目前正在使用python amazon api,这是我的代码。

Private Function Validate() As Boolean

    If IsNull(Me.cmbBank.Column(0)) = True Then
        MsgBox "No bank selected"
        Me.cmbBank.SetFocus
        Validate = False
        Exit Function
    End If

    Validate = True
End Function

这样可以正常工作,但会返回非常多的结果。另一方面,如果我按照文档中的说法进行操作并添加#!python api = API(cfg=config.amzconfig) query='justin bieber' thingy = api.item_search('Blended', ResponseGroup='Large', Keywords=query) print(thingy) for thing in thingy: # print(lxml.etree.tostring(item, pretty_print=True)) try: print('%s' % thing.ItemAttributes.Title) print('%s' % thing.DetailPageURL) print('%s' % thing.SmallImage.URL) except: continue ,则不会返回任何结果。

1 个答案:

答案 0 :(得分:1)

在挖掘源代码后,您可以设置limit=1来获取页数

相关问题