A simple Python script to scrape NASA's Planetary Data System (PDS) website and download images of the Moon.
I found these images from this article (HackerNews discussion). Direct link to images is here.
Image paths are scraped via scrape_paths.py
script and saved to images.txt
.
For all scripts:
- Python 2.7
urllib2
To run lunar_scrape.py
(the main script), you'll need:
pathlib2
multiprocessing
To run find_paths.py
, you'll need:
functools
itertools
bs4
(BeautifulSoup)
To download all images, run:
python lunar_scrape.py
This will download all images to the /images
directory, flattening them into a single directory.
To preserve the original directory, run:
python lunar_scrape.py --preserve-dir