 
     %Stop{name: Floki.text(name),
           ref: line,
-          lines: lines  }
+          lines: lines}
   end
 
   defp parse_stop(_), do: nil

  defp get_body({:ok,
                 %HTTPoison.Response{status_code: 302,
                                     headers: headers}}) do

    {_,location} = Enum.find(headers, fn(header) -> elem(header, 0) == "Location" end)

    %{"stop" => stop} = Regex.named_captures(@regex, location)


  @spec get_info(String.t) :: stop
  def get_info(id) when is_binary(id) do
    stop = String.rjust(id,5,?0)
    url = @info_url <> stop

    {:ok, body} = url
    |> HTTPoison.get
    |> get_body

    timetable = body
    |> Floki.find(".gridRow")
    |> Enum.map(&parse_row/1)

    name = body
    |> Floki.find("#stopTitle")
    |> Floki.text
    |> String.split("-")
    |> List.first
