You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
smol_scriptz/dl_images.rb

13 lines
268 B

# frozen_string_literal: true
require 'nokogiri'
require 'open-uri'
puts 'what to crawl'
# url = gets.chomp
url = 'http://boards.4chan.org/d/thread/8571429'
url = url.open
result = URI.extract(url).select { |a| a[/\.(?:gif|png|jpg|jpeg)\b/] }
cmd "wget #{result}"