1
我目前正试图让此查询只返回结果的第一页。我目前使用python amazon api,这是我的代码。试图只获得亚马逊搜索的第一页结果
#!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
这工作正常,但返回了非常大量的结果。另一方面,如果我按照其文档中所述的方式进行操作并添加paginate=False
,则不会返回任何结果。