mirror of
https://github.com/StrawberryMaster/wayback-machine-downloader.git
synced 2025-12-17 09:46:05 +00:00
Remove list attribute from the downloader.
Whether to list or download is a program option external to the downloader
This commit is contained in:
parent
ea73ed5ed6
commit
6b8c1aa194
@ -58,7 +58,7 @@ end.parse!
|
||||
if (base_url = ARGV[-1])
|
||||
options[:base_url] = base_url
|
||||
wayback_machine_downloader = WaybackMachineDownloader.new options
|
||||
if wayback_machine_downloader.list
|
||||
if options[:list]
|
||||
wayback_machine_downloader.list_files
|
||||
else
|
||||
wayback_machine_downloader.download_files
|
||||
|
||||
@ -17,7 +17,7 @@ class WaybackMachineDownloader
|
||||
VERSION = "1.1.5"
|
||||
|
||||
attr_accessor :base_url, :directory, :from_timestamp, :to_timestamp,
|
||||
:only_filter, :exclude_filter, :all, :list, :maximum_pages, :threads_count
|
||||
:only_filter, :exclude_filter, :all, :maximum_pages, :threads_count
|
||||
|
||||
def initialize params
|
||||
@base_url = params[:base_url]
|
||||
@ -27,7 +27,6 @@ class WaybackMachineDownloader
|
||||
@only_filter = params[:only_filter]
|
||||
@exclude_filter = params[:exclude_filter]
|
||||
@all = params[:all]
|
||||
@list = params[:list]
|
||||
@maximum_pages = params[:maximum_pages] ? params[:maximum_pages].to_i : 100
|
||||
@threads_count = params[:threads_count].to_i
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user