Created
January 13, 2019 12:13
-
-
Save keisei1092/17e5060ff6b961af80222c8a388b3655 to your computer and use it in GitHub Desktop.
[WIP] Danbooru Downloader
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'httparty' | |
dir = File.expand_path(File.join(File.dirname(__FILE__), '..', 'downloaded')) | |
response = HTTParty.get 'https://gelbooru.com/index.php?page=dapi&s=post&q=index&tags=hatsune_miku&json=1' | |
response | |
.parsed_response | |
.map { |r| { r['file_url'] } } | |
.tap { |r| puts r } | |
# .each { |u| | |
# File.open(u, "w") { |f| | |
# response = HTTParty.get(u, str) | |
# } | |
# } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment