I have about 300 small files that I need to download from a website. All are located in one directory. The files are of different sizes and have different extensions. I don't want to type each one into my web browser and then click 'save as' and such. I want to give my list to python and have it download and save each file in a directory. If python can simply download the directory, that would be even better.
相关问题
- how to define constructor for Python's new Nam
- streaming md5sum of contents of a large remote tar
- How to get the background from multiple images by
- Evil ctypes hack in python
- Correctly parse PDF paragraphs with Python
If you're on python 3.3, you're looking for urllib:
You should now have a file in your working directory called "my_image.png"
This is all detailed here. I would favor using Requests as it's generally great, but urllib2 is in the standard library so doesn't require the installation of a new package.