Sfoglia il codice sorgente

/providers: country name sanitizing captures abbreviations, too

Helge Jung 9 anni fa
parent
commit
7114c3a7cd
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      ffstatus/server.py

+ 1 - 1
ffstatus/server.py

@@ -500,7 +500,7 @@ class BatcaveHttpRequestHandler(BaseHTTPRequestHandler):
 					isp = re.sub(r'(B2B )?(aggregate|aggregation)?$', '', isp, flags=re.IGNORECASE)
 
 					# normalize name: strip country suffixes (in Germany)
-					isp = re.sub(r'(DE|Deutschland|Germany|Nordrhein[- ]Westfalen|Baden[- ]Wuerttemburg|Hessen|Niedersachsen|Rheinland[- ]Pfalz)$', '', isp, flags=re.IGNORECASE)
+					isp = re.sub(r'(DE|Deutschland|Germany|Nordrhein[- ]Westfalen|NRW|Baden[- ]Wuerttemburg|BW|Hessen|Niedersachsen|Rheinland[- ]Pfalz|RLP)$', '', isp, flags=re.IGNORECASE)
 
 				item_isps.add(isp)