Skip to content

Commit aca2d97

Browse files
authored
Merge pull request #190 from Datenschule/fix-deprecations
Fix a couple of deprecations
2 parents 0fabd2c + c570346 commit aca2d97

File tree

3 files changed

+6
-9
lines changed

3 files changed

+6
-9
lines changed

jedeschule/settings.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@
2121
# Crawl responsibly by identifying yourself (and your website) on the user-agent
2222
USER_AGENT = "jedeschule (+http://jedeschule.codefor.de/docs)"
2323

24-
REQUEST_FINGERPRINTER_IMPLEMENTATION = "2.7"
25-
2624
# Obey robots.txt rules
2725
ROBOTSTXT_OBEY = False
2826

jedeschule/spiders/bremen.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,9 @@ def normalize(item: Item) -> School:
6161
return School(
6262
name=item.get("name").strip(),
6363
id="HB-{}".format(item.get("id")),
64-
address=re.split("\d{5}", item.get("Anschrift:").strip())[0].strip(),
65-
zip=re.findall("\d{5}", item.get("Anschrift:").strip())[0],
66-
city=re.split("\d{5}", item.get("Anschrift:").strip())[1].strip(),
64+
address=re.split(r"\d{5}", item.get("Anschrift:").strip())[0].strip(),
65+
zip=re.findall(r"\d{5}", item.get("Anschrift:").strip())[0],
66+
city=re.split(r"\d{5}", item.get("Anschrift:").strip())[1].strip(),
6767
website=item.get("Internet").strip() if item.get("Internet") else None,
6868
email=item.get("E-Mail-Adresse").strip(),
6969
fax=BremenSpider.fix_number(item.get("Telefax")),

jedeschule/spiders/sachsen_anhalt.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,9 @@ def normalize(item: Item) -> School:
5454
return School(
5555
name=item.get("Name"),
5656
id="ST-{}".format(item.get("ID")),
57-
address=re.split("\d{5}", item.get("Adresse").strip())[0].strip(),
58-
zip=re.findall("\d{5}", item.get("Adresse").strip())[0],
59-
city=re.split("\d{5}", item.get("Adresse").strip())[1].strip(),
60-
# address=item.get('Adresse'),
57+
address=re.split(r"\d{5}", item.get("Adresse").strip())[0].strip(),
58+
zip=re.findall(r"\d{5}", item.get("Adresse").strip())[0],
59+
city=re.split(r"\d{5}", item.get("Adresse").strip())[1].strip(),
6160
website=item.get("Homepage"),
6261
email=item.get("E-Mail"),
6362
fax=item.get("Telefax"),

0 commit comments

Comments
 (0)