I need to download a single folder from a github repository in a Python 3 script.
I have read about web services that do what I would need, such as downgit.github.io
, but the problem is that generating the relevant URL and fetching it via urllib.request.urlretrive()
downloads the website rather than the actual file.
What can I do? Is there a web service that provides raw file links that I can download as described above?
I just found a solution: The ffspec
library may be used to download a single folder from a GitHub repository using Python. See https://sebastianwallkoetter.wordpress.com/2022/01/30/copy-github-folders-using-python/