项目作者: creativeprojects

项目描述 :
Simple gallery downloader in go
高级语言: Go
项目地址: git://github.com/creativeprojects/gallery-downloader.git
创建时间: 2020-03-28T01:07:13Z
项目社区:https://github.com/creativeprojects/gallery-downloader

开源协议:MIT License

下载


Gallery Downloader

Simply download all pictures from a web page

Usage

From a remote web page

  1. gallery-downloader -source https://website.example.com -output ~/all-images/

From a local web page

  1. gallery-downloader -source ./example.html -referer https://website.example.com/ -output ~/all-images/

Galleries

Type “AnchorHREF”

It downloads all the linked pictures from these HTML tags:

  1. <a href="picture1.jpg" title="picture title">picture 1</a>
  2. <a href="picture2.jpg" title="picture title">picture 2</a>

Type “ListItem”

It simply downloads all the linked pictures from these HTML tags:

  1. <li><img src="picture1.jpg" alt="picture1" title="picture1"/></li>
  2. <li><img src="picture2.jpg" alt="picture2" title="picture2"/></li>

Flags

  1. -base string
  2. base URL when downloading relative images
  3. -config string
  4. configuration file (default "config.json")
  5. -insecure-tls
  6. Skip TLS certificate verification. Should only be enabled for testing locally
  7. -max-wait int
  8. wait n milliseconds maximum before downloading the next image. Use 0 to deactivate (default 3000)
  9. -min-wait int
  10. wait n milliseconds minimum before downloading the next image. Use 0 to deactivate (default 1000)
  11. -output string
  12. output folder to store pictures
  13. -password string
  14. password (if the http server needs basic authentication)
  15. -referer string
  16. referer header for HTML file, or for downloading images from a local HTML file
  17. -source string
  18. source HTML gallery
  19. -type string
  20. type of gallery (AutoDetect, AnchorHREF, ListItem) (default "AutoDetect")
  21. -user string
  22. user (if the http server needs basic authentication)