urschrei / pyzotero

Pyzotero: a Python client for the Zotero API
https://pyzotero.readthedocs.org
Other
910 stars 100 forks source link

There has an question of this code #133

Closed xingziyangxyz closed 3 years ago

xingziyangxyz commented 3 years ago

I used follow code read doc list in my zotero, there is 27 items in collection "04", but the output of code is 76. I con not understand why?

zot = zotero.Zotero(library_id, library_type, api_key ,locale="zh-CN") colls = zot.collections() for coll in colls: if coll['data']['name'] == '04': key=coll['key'] break pyz = zot.everything(zot.collection_items(key)) print(len(pyz))

urschrei commented 3 years ago

I assume you need top-level items: https://pyzotero.readthedocs.io/en/latest/index.html?highlight=collection_items#zotero.Zotero.collection_items_top