Counter Top LCD to display next bus times

Sorry to revive an old topic, but @gtg662w I’d love to get the code you used to retrieve and parse the transit info. Yours is the only project I can find that’s based in SF. Do you still have the code handy? If anyone else has used a Photon to retrieve info directly from NextBus without using proxy servers and a bunch of other stuff, please chime in as well.

Oh boy…i don’t I have the source code with me anymore. But I remember that there is an easy Public XML feed that one can use. Check out page 13 here: https://www.nextbus.com/xmlFeedDocs/NextBusXMLFeed.pdf.
And to parse it, I just counted the brackets i…e “<” until I got to the “prediction seconds” tag. And then I just counted until I got the numbers.
For example this link : http://webservices.nextbus.com/service/publicXMLFeed?command=predictions&a=sf-muni&r=N&s=5205&useShortTitles=true, gives the time prediction for N line at Judah and 28th.

Awesome, thank you!