We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fb52281 commit bf124a4Copy full SHA for bf124a4
jedeschule/spiders/mecklenburg_vorpommern.py
@@ -6,6 +6,13 @@
6
from jedeschule.spiders.school_spider import SchoolSpider
7
8
9
+def as_string(value: str):
10
+ try:
11
+ return str(int(value))
12
+ except ValueError:
13
+ return value
14
+
15
16
class MecklenburgVorpommernSpider(SchoolSpider):
17
name = "mecklenburg-vorpommern"
18
# The state provides the data as an Excel file. The current year's
@@ -32,7 +39,7 @@ def parse(self, response):
32
39
def normalize(item: Item) -> School:
33
40
return School(
34
41
name=item.get("NAME1"),
35
- id="MV-{}".format(item.get("DIENSTSTELLEN-NUMMER")),
42
+ id="MV-{}".format(as_string(item.get("DIENSTSTELLEN-NUMMER"))),
36
43
address=item.get("STRASSE"),
37
44
address2="",
38
45
zip=item.get("PLZ"),
0 commit comments