pc-coholic / PyMVGLive

Python-Library to get live-data from mvg-live.de - yet another workaround the official, non-released API....
14 stars 2 forks source link

Get disruption data from MVG-live #10

Closed mountainsandcode closed 7 years ago

mountainsandcode commented 7 years ago

New method to crawl data and retrieve information about live disruptions from MVG-live.de

pc-coholic commented 7 years ago

Thank you for this PR as well :)

I am just wondering though if we should use the API for this or stick to the RSS-Feed (http://www.mvg-mobil.de/Tickerrss/CreateRssClass) as I have done here: https://github.com/muccc/anzeigr/blob/master/current_nodes/mvgdefas/ticker/getmvgticker.py

The reason I am wondering is, that we don't know anything about the request-limits for the API - so offloading calls for the disruption-data to the RSS-feed might help us stay clear of any limits...

Or we offer both ways to get this data... Let me think about this a little :)

mountainsandcode commented 7 years ago

Hadn't come across the RSS-feed, that would definitely be a convenient alternative. Good point about the request-limit as well, I think the RSS might be the way to go

mountainsandcode commented 7 years ago

Had another look and I think the RSS is definitely the way to go. Having the timestamp alone makes that worth it. Perhaps you could reuse the code you linked to above?

pc-coholic commented 7 years ago

Right now I do not have the time to properly integrate the RSS-feed into the library, so I am merging your PR and just mention the RSS-feed in the Readme.

Perhaps one day, we can integrate both and offer a switch or something like that.

Thanks for your contribution!