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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a4e7141cf502ca6fdb1286d4b3b65b31a23b666e
4
- data.tar.gz: 64cc94fce5c28656bbcd2dd961c7b9e687be0acd
3
+ metadata.gz: bd1091c6a48634f40025d9af44a8e57e78ccda43
4
+ data.tar.gz: 93459fe9e0c42c09616fa18e55838c1710c6dc9d
5
5
  SHA512:
6
- metadata.gz: a55afd26d458022341683dcb8ff833cc778677fc377430d23db7e1080649fb3ac4df22d54ba31c56a56a60596532bf7bb58d4644a5de41d709eb0d239f966eb4
7
- data.tar.gz: d465ecaab102bc2c28657b79e26d7cd3dca96b82aad18e3200e62a1ac7b52929590ee6fb1ef1bf7977e27b7f54f11dd47b409d907de7d296a304d8e14e1d3cc0
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.5"
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wayback_machine_downloader
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.5
4
+ version: 0.4.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - hartator