Idk how to explain ts

This commit is contained in:
2026-07-15 22:07:33 -06:00
parent 1ec2083555
commit da714f423c
+6 -1
View File
@@ -65,6 +65,7 @@ config = File.read("config.txt")
while repeat < ARGV.size
if Valid.url? ARGV[repeat]
begin
response = HTTP::Client.get(ARGV[repeat])
if config.includes?(response.status_code.to_s)
puts "#{ARGV[repeat]} is a valid URL and works. Status code: #{response.status_code}"
@@ -73,7 +74,11 @@ while repeat < ARGV.size
puts "#{ARGV[repeat]} is a valid URL but does not work. Status Code: #{response.status_code}"
notWorking += 1
end
elsif
rescue Socket::Addrinfo::Error
puts "#{ARGV[repeat]} is a valid URL but does not exist."
notWorking += 1
end
else
puts "#{ARGV[repeat]} is not a valid URL"
notWorking += 1
end