wayback_machine_downloader 0.5.2 → 0.5.3

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: 6e8e67ec7151007262531e212daeb7d9661229bb
4
- data.tar.gz: 405cc5af1c47c4c646b107dd1942da7b08522f9a
3
+ metadata.gz: f13c4b2fd341ad88d3962eb775435ab41ddabb43
4
+ data.tar.gz: 25b0d71d96dbeafd1e055a5d235544a1a23fd452
5
5
  SHA512:
6
- metadata.gz: ce351cd1a5ac4b2fc8b43df6fdaed64a2221adb55dbfc06b1c7ff92c8d2a93cc860277289b6883014634909ab35df19fff2b3ccddf285d6b1482cd6e39f212cb
7
- data.tar.gz: 3ed8f178af32bea7476118fff6a3fb0c8184ef111a4f123a878305e3ccde2682b35f41fe9dc683aa07d9ea67e3d47c0664ddc05c27544fd1468f8372ce6c9d9f
6
+ metadata.gz: 3b97a0422f514ca4026fd1235bb60103316f943906187ce50578c033c4e350820d0eab24c19db09198d40c16e44a6713431178c28ff962d2627b30c0e8d317e8
7
+ data.tar.gz: 858cb6cbb51f32736d0e1f4496b555ae1d8fa15d97ce7d7f4cb3616115b6ee93cb0c2751f4b6d0cd1428c50109b461d2bbf503be4455bff99cef769f23d7b358
@@ -9,7 +9,7 @@ require_relative 'wayback_machine_downloader/to_regex'
9
9
 
10
10
  class WaybackMachineDownloader
11
11
 
12
- VERSION = "0.5.2"
12
+ VERSION = "0.5.3"
13
13
 
14
14
  attr_accessor :base_url, :from_timestamp, :to_timestamp, :only_filter, :exclude_filter, :all, :list, :threads_count
15
15
 
@@ -78,11 +78,11 @@ class WaybackMachineDownloader
78
78
  file_list_curated = Hash.new
79
79
  [index_file_list_raw, all_file_list_raw].each do |file|
80
80
  file.each_line do |line|
81
- line = line.split(" ")
82
- file_timestamp = line[0].to_i
83
- file_url = line[1]
81
+ next unless line.include?('/')
82
+ file_timestamp = line[0..13].to_i
83
+ file_url = line[15..-2]
84
84
  file_id = file_url.split('/')[3..-1].join('/')
85
- file_id = CGI::unescape file_id
85
+ file_id = CGI::unescape file_id
86
86
  file_id = file_id.tidy_bytes unless file_id == ""
87
87
  if file_id.nil?
88
88
  puts "Malformed file url, ignoring: #{file_url}"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wayback_machine_downloader
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.2
4
+ version: 0.5.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - hartator
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-09-16 00:00:00.000000000 Z
11
+ date: 2016-09-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake