Currently its a manual process as mentioned below in the link: https://help.salesforce.com/articleView?id=pardot_export_prospects.htm&type=5
Can we use python to fetch data instead of doing manual work? Please share an example of the code
Use Official Pardot API Documentation and PyPardot - Python API wrapper for Pardot.
See querying objects for code example and querying prospects section of API docs for supported operations.