浏览代码

/providers: country name sanitizing captures abbreviations, too

Helge Jung 9 年之前
父节点
当前提交
7114c3a7cd
共有 1 个文件被更改,包括 1 次插入1 次删除
  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)