Add an additional request to archive.org API to get fresher snapshots

This commit is contained in:
hartator 2016-09-24 10:21:17 -07:00
parent 45f5f29826
commit 7414c34d05

View File

@ -77,10 +77,13 @@ class WaybackMachineDownloader
end
def get_all_snapshots_to_consider
# Note: Passing a page index parameter allow us to get more snapshot, but from a less fresh index
print "Getting snapshot pages"
snapshot_list_to_consider = ""
snapshot_list_to_consider += get_raw_list_from_api(@base_url, nil)
print "."
snapshot_list_to_consider += get_raw_list_from_api(@base_url + '/*', nil)
print "."
@maximum_pages.times do |page_index|
snapshot_list = get_raw_list_from_api(@base_url + '/*', page_index)
break if snapshot_list.empty?