[Regensburg] Data
Web: http://www.regensburg.de/parkinfo/ RSS: http://www.regensburg.de/parkinfo/rss/index.php
Mit maschinenlesbaren Daten, wie wunderbar ✨
ich habe da mal was gemacht.
I took a second look at your work but noticed that you use the first link. I merged your pull request for now but can you please rework Regensburg to use the RSS feed? This should be much easier to parse and as it is RSS the format is more unlikely to change than the website.
looking at the RSS-thing:
when opening the link via the browser I receive:
http://www.regensburg.de/parkinfo/ Freie Stellplaetze in den Parkhaeusern der Stadt Regensburg de Copyright Stadt Regensburg [email protected] (reinecke) [email protected] (Hans-Juergen Sonnleitner) Mon, 26 Mar 2018 10:19:00 +0200
by accessing the link via feedparser I recieve:
{'feed': {}, 'entries': [], 'bozo': 1, 'encoding': 'utf-8', 'version': '', 'bozo_exception': SAXParseException('not well-formed (invalid token)',), 'namespaces': {}}
What did I do wrong?
Oh, I found this:
feed[ "bozo" ] | 1 if the feed data isn't well-formed XML.
and I received a 1.
fault on my side.
I got an answer and will look into it.
here is an example:
import feedparser NewsFeed = feedparser.parse("http://www.regensburg.de/parkinfo/rss/index.php") print(NewsFeed) entry = NewsFeed.entries[1] print (entry.keys()) print( entry.title)
which returns:
Parkplatz Dultplatz: 1401 Stellplaetze frei
looking at the web-site it tells me: 202 entries free
this is valid for every parking-lot.
I think the RSS feed is broken. Nearly two weeks later the free count of Dultplatz is still at exactly 1401. I assume it isn't being updated at all.
the RSS-feed is outdated.
The script for Regensburg uses the HTML. I would like to close the discussion on this topic here.