项目作者: huyndao

项目描述 :
apod-dl.py: Download pictures from NASA's APOD (Astronomy Picture of the Day) site
高级语言: Python
项目地址: git://github.com/huyndao/apod-download.git
创建时间: 2020-11-10T22:55:46Z
项目社区:https://github.com/huyndao/apod-download

开源协议:MIT License

下载


apod-dl.py: Download pictures from NASA’s APOD (Astronomy Picture of the Day) site

Description

By default, all images will be downloaded to a directory named apod-images. If directory does not exist, the script will create one.

Additionally, the image filename, image date and image text will be written to file: apod-images/album_list.txt

Press Ctrl + C while downloading to abort.

Install Dependencies

  1. pip install -r requirements.txt

Requirements

  • python3
  • requests
  • beautifulsoup4
  • lxml

Help

  1. python3 apod-dl.py -h
  2. usage: apod-dl.py [-h] [-u URL] [-d DIR] [-o]
  3. optional arguments:
  4. -h, --help show this help message and exit
  5. -u URL, --url URL start url. Start from this page. If omitted, will start with today's page
  6. -d DIR, --dir DIR name of directory to save files to. If omitted, will create and save files to ./apod-images/
  7. -o, --oneday just get the one day's apod and nothing else

Sample Usage

Download everything from today’s date and backward infinity:

  1. python3 apod-dl.py

Download from date’s url and backward infinity:

  1. python3 apod-dl.py -u "https://apod.nasa.gov/apod/ap201109.html"

Download today’s picture only:

  1. python3 apod-dl.py -o

Download date’s picture only:

  1. python3 apod-dl.py -o -u "https://apod.nasa.gov/apod/ap201109.html"