arthurdejong / python-stdnum

A Python library to provide functions to handle, parse and validate standard numbers.
https://arthurdejong.org/python-stdnum/
GNU Lesser General Public License v2.1
498 stars 206 forks source link

Support new Austrian postal code list #235

Closed arthurdejong closed 3 years ago

arthurdejong commented 4 years ago

The current update script (update/at_postleitzahl.py) fails because the page it used (https://www.post.at/en/business_advertise_products_and_services_addresses_postcodes.php) no longer exists, probably because the postal service changed their website.

Currently there is https://www.post.at/sf/standortfinder which offers search functionality. There is also https://api.www.post.at/ which does not have clear documentation but this URL at least seems to return all post offices (unsure if that includes all postal codes through). It returns 2168 post offices while the previous list 2221 postal codes. There could also be another API endpoint that includes more useful information.

Any help here would be welcome, especially if someone knows a little more about the Austrian postal system.

brot commented 3 years ago

There is on Austrian open-data portal on which you can find and use the list of postal-codes. The data is available as CSV, XML or JSON

arthurdejong commented 3 years ago

Thanks @brot

In a0c62ee the update script was changed to use a spreadsheet downloaded from https://www.post.at/g/c/postlexikon instead but this is indeed much better (fixed in 407a02f).

I did filter the list to only include those that have "adressierbar" as "Ja" because that matches the old list.