mirror of
https://github.com/StrawberryMaster/wayback-machine-downloader.git
synced 2025-12-18 02:06:35 +00:00
Skip lines that don't include an url
This commit is contained in:
parent
bdf611bce9
commit
d4bc975043
@ -78,10 +78,11 @@ class WaybackMachineDownloader
|
||||
file_list_curated = Hash.new
|
||||
[index_file_list_raw, all_file_list_raw].each do |file|
|
||||
file.each_line do |line|
|
||||
next unless line.include?('/')
|
||||
file_timestamp = line[0..13].to_i
|
||||
file_url = line[15..-2]
|
||||
file_id = file_url.split('/')[3..-1].join('/') rescue nil
|
||||
file_id = CGI::unescape file_id
|
||||
file_id = file_url.split('/')[3..-1].join('/')
|
||||
file_id = CGI::unescape file_id
|
||||
file_id = file_id.tidy_bytes unless file_id == ""
|
||||
if file_id.nil?
|
||||
puts "Malformed file url, ignoring: #{file_url}"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user