mirror of
https://github.com/StrawberryMaster/wayback-machine-downloader.git
synced 2025-12-17 17:56:44 +00:00
Ignore line with erroneous UTF-8 characters
This commit is contained in:
parent
95655b1263
commit
44924d0f5c
@ -28,6 +28,10 @@ class WaybackMachineDownloader
|
|||||||
[index_file_list_raw, all_file_list_raw].each do |file|
|
[index_file_list_raw, all_file_list_raw].each do |file|
|
||||||
file.each_line do |line|
|
file.each_line do |line|
|
||||||
line = line.tidy_bytes
|
line = line.tidy_bytes
|
||||||
|
unless line
|
||||||
|
puts "Malformed line, ignoring."
|
||||||
|
next
|
||||||
|
end
|
||||||
line = line.split(' ')
|
line = line.split(' ')
|
||||||
file_timestamp = line[1].to_i
|
file_timestamp = line[1].to_i
|
||||||
file_url = line[2]
|
file_url = line[2]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user