From 658202d0e7df0d2c46b8ebe28709f2e67730be04 Mon Sep 17 00:00:00 2001
From: Luke Bratch <luke@bratch.co.uk>
Date: Fri, 5 Apr 2024 11:59:13 +0100
Subject: [PATCH] Use Nokogiri::HTML(URI.open()) instead of
 Nokogiri::HTML(open()).

---
 blatube.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/blatube.rb b/blatube.rb
index 724cfeb..6e07106 100644
--- a/blatube.rb
+++ b/blatube.rb
@@ -185,7 +185,7 @@ def build_route_output
 end
 
 def get_line_status
-  xml = Nokogiri::HTML(open('http://cloud.tfl.gov.uk/TrackerNet/LineStatus')).remove_namespaces!
+  xml = Nokogiri::HTML(URI.open('http://cloud.tfl.gov.uk/TrackerNet/LineStatus')).remove_namespaces!
   sorted_lines = xml.xpath('//linestatus').sort_by {|xml| xml.xpath('.//line/@name').text}
   found_line, line = interpret sorted_lines.map{|xml| xml.xpath('.//line/@name').text.upcase} << 'SUMMARY', @line.upcase
   return unless found_line
-- 
GitLab