PythonFlickrAPI工具包:如何限制结果的数量?

2024-05-28 23:33:53 发布

您现在位置:Python中文网/ 问答频道 /正文

documentation上写着

walk_set(self, photoset_id, per_page=50, ...)
source code 
Other arguments can be passed, as documented in the flickr.photosets.getPhotos API call in the Flickr API documentation, except for page because all pages will be returned eventually.  

如果我只想要20个结果,我怎么能做到呢?否则,它只需继续运行并获取数据

谢谢你


Tags: theinselfapiidsourcedocumentationpage
2条回答

getPhotos所述,您可以:

walk_set(self, photoset_id, per_page=20, page=1)

如果只需要20张照片,请不要使用walk_set,因为它的目的是迭代一组中的所有照片。直接使用flickr.photosets.getPhotos,并指定per_page=20和{}。在

相关问题 更多 >

    热门问题