#!/usr/bin/python3
#

from google.transit import gtfs_realtime_pb2
import urllib.request

feedurl = "https://realtimetcatbus.availtec.com/InfoPoint/GTFS-Realtime.ashx?&Type=VehiclePosition&servrid=0"

feed = gtfs_realtime_pb2.FeedMessage()
response = urllib.request.urlopen(feedurl)
feed.ParseFromString(response.read())
for entity in feed.entity:
  if entity.HasField('vehicle'):
    print("yep")
    print(entity.vehicle)
