wayback_machine_downloader 0.4.5 → 0.4.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/wayback_machine_downloader.rb +6 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bd1091c6a48634f40025d9af44a8e57e78ccda43
|
4
|
+
data.tar.gz: 93459fe9e0c42c09616fa18e55838c1710c6dc9d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 875230237f97b370bd9984d4ee328d4c001f584ee2a0ff1af5387ffcf690526b974172ce67bed6f1a9c9a6a48b9c6be91a4da0474aa412dabb0ad2e6b911063d
|
7
|
+
data.tar.gz: b8e664467c86c297c8fa4d89a1577e4448421db0feabcf26044b3eb674fa05d86a3c1bffba4cbb434946078d2cd443fd9f9ec7a6681cde7a2f338fd9d9a5fb17
|
@@ -9,7 +9,7 @@ require_relative 'wayback_machine_downloader/to_regex'
|
|
9
9
|
|
10
10
|
class WaybackMachineDownloader
|
11
11
|
|
12
|
-
VERSION = "0.4.
|
12
|
+
VERSION = "0.4.6"
|
13
13
|
|
14
14
|
attr_accessor :base_url, :from_timestamp, :to_timestamp, :only_filter, :exclude_filter, :all, :list
|
15
15
|
|
@@ -170,6 +170,11 @@ class WaybackMachineDownloader
|
|
170
170
|
end
|
171
171
|
rescue StandardError => e
|
172
172
|
puts "#{file_url} # #{e}"
|
173
|
+
ensure
|
174
|
+
if File.size(file_path) == 0 and not @all
|
175
|
+
File.delete(file_path)
|
176
|
+
puts "#{file_path} was empty and was removed."
|
177
|
+
end
|
173
178
|
end
|
174
179
|
puts "#{file_url} -> #{file_path} (#{count}/#{file_list_by_timestamp.size})"
|
175
180
|
else
|