Add weekend Network 10
[bus.git] / maxious-canberra-transit-feed / 01-extracttimes.rb
blob:a/maxious-canberra-transit-feed/01-extracttimes.rb -> blob:b/maxious-canberra-transit-feed/01-extracttimes.rb
--- a/maxious-canberra-transit-feed/01-extracttimes.rb
+++ b/maxious-canberra-transit-feed/01-extracttimes.rb
@@ -14,7 +14,7 @@
 	timetable = {"between_stops" => [], "short_name" => short_name}
 	time_points = table.xpath('tr[1]//th').map do |tp|
 		if tp.content != "\302\240" && tp.content != "" && tp.content != "<br/>"
-			timing_point = tp.content.squeeze(" ").gsub("Bus Station"," Bus Station ").gsub(" Platform"," (Platform").gsub("  - "," - ").gsub("\n"," ").gsub("\r"," ").gsub("\t"," ").gsub("\\"," / ").gsub("/"," / ").gsub(","," ").gsub("\302\240","").squeeze(" ").strip
+			timing_point = tp.content.squeeze(" ").gsub("Shops"," ").gsub("Bus Station"," Bus Station ").gsub(" Platform"," (Platform").gsub("  - "," - ").gsub("\n"," ").gsub("\r"," ").gsub("\t"," ").gsub("\\"," / ").gsub("/"," / ").gsub(","," ").gsub("\302\240","").squeeze(" ").strip
 			if (tp.content.match('Platform'))
 			  timing_point.concat(")")
 			end;
@@ -79,7 +79,9 @@
 		timetables << makeTimetable(table, "stop_times", short_name)
 	end
 	doc.xpath('//table[preceding::text()="This timetable is effective from Monday 15th November 2010."]').each do |table|
-		timetables << makeTimetable(table, "stop_times", short_name)
+		if short_name[0].chr != "9" or short_name.size == 1
+		  timetables << makeTimetable(table, "stop_times", short_name)
+		end
 	end
 	#all tables are weekdays on some really malformatted timetables
 	if short_name == "170"