Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # pip install python-documentcloud
- from documentcloud import DocumentCloud
- import creds
- username = "someone@somewhere.com"
- password = "somethingsneaky"
- projectsought = "Cool set of documents"
- client = DocumentCloud(username, password)
- project = client.projects.get(title=projectsought)
- pagecount = 0
- for document in project.document_ids:
- docobj = project.get_document(document)
- pagecount += docobj.pages
- print(str(pagecount) + " pages from " + str(len(project.document_ids)) + " documents found in " + projectsought)
- # 5433 pages from 643 documents found in Cool set of documents
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement