ParkAPI icon indicating copy to clipboard operation
ParkAPI copied to clipboard

[Regensburg] Data

Open todvora opened this issue 9 years ago • 9 comments

Web: http://www.regensburg.de/parkinfo/ RSS: http://www.regensburg.de/parkinfo/rss/index.php

todvora avatar Dec 19 '16 11:12 todvora

Mit maschinenlesbaren Daten, wie wunderbar ✨

kiliankoe avatar Dec 19 '16 15:12 kiliankoe

ich habe da mal was gemacht.

AugustQu avatar Jun 03 '19 13:06 AugustQu

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.

jklmnn avatar Jun 10 '19 12:06 jklmnn

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?

AugustQu avatar Jun 10 '19 14:06 AugustQu

Oh, I found this: feed[ "bozo" ] | 1 if the feed data isn't well-formed XML.

and I received a 1.

AugustQu avatar Jun 10 '19 14:06 AugustQu

fault on my side.

I got an answer and will look into it.

AugustQu avatar Jun 10 '19 14:06 AugustQu

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.

AugustQu avatar Jun 10 '19 15:06 AugustQu

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.

jklmnn avatar Jun 23 '19 12:06 jklmnn

the RSS-feed is outdated.

The script for Regensburg uses the HTML. I would like to close the discussion on this topic here.

AugustQu avatar Jun 24 '19 09:06 AugustQu