documents_download.py 423 B

123456789101112131415161718192021
  1. import os
  2. import subprocess
  3. from db_utils import get_documents
  4. def main(PATH):
  5. itr = 0
  6. for document in get_documents():
  7. url = document.url
  8. print(url)
  9. itr += 1
  10. if itr == 5:
  11. break
  12. if __name__ == "__main__":
  13. HOME_DIR = os.path.expanduser("~")
  14. BASE_DIR = "Code/pdf_parser/document_download_from_server"
  15. PATH = os.path.join(HOME_DIR, BASE_DIR)
  16. main(PATH)