Explorar o código

crawl code review

zhangfan hai 3 días
pai
achega
38c26b3870
Modificáronse 2 ficheiros con 30 adicións e 30 borrados
  1. 17 17
      anhui/gov_commodity_anhui_city.py
  2. 13 13
      jiangsu/gov_commodity_jiangsu_city.py

+ 17 - 17
anhui/gov_commodity_anhui_city.py

@@ -1,6 +1,6 @@
+import time
 from pathlib import Path
 
-import pandas
 import pandas as pd
 
 from utils import base_country_code, base_mysql
@@ -8,22 +8,22 @@ from utils.base_country_code import format_sql_value
 from utils.log import log
 
 city_code_map = {
-    "安徽省合肥市": "3401",
-    "安徽省芜湖市": "3402",
-    "安徽省蚌埠市": "3403",
-    "安徽省淮南市": "3404",
-    "安徽省马鞍山市": "3405",
-    "安徽省淮北市": "3406",
-    "安徽省铜陵市": "3407",
-    "安徽省安庆市": "3408",
-    "安徽省黄山市": "3410",
-    "安徽省滁州市": "3411",
-    "安徽省阜阳市": "3412",
-    "安徽省宿州市": "3413",
-    "安徽省六安市": "3415",
-    "安徽省亳州市": "3416",
-    "安徽省池州市": "3417",
-    "安徽省宣城市": "3418"
+    "安徽省合肥市": "340100",
+    "安徽省芜湖市": "340200",
+    "安徽省蚌埠市": "340300",
+    "安徽省淮南市": "340400",
+    "安徽省马鞍山市": "340500",
+    "安徽省淮北市": "340600",
+    "安徽省铜陵市": "340700",
+    "安徽省安庆市": "340800",
+    "安徽省黄山市": "341000",
+    "安徽省滁州市": "341100",
+    "安徽省阜阳市": "341200",
+    "安徽省宿州市": "341300",
+    "安徽省六安市": "341500",
+    "安徽省亳州市": "341600",
+    "安徽省池州市": "341700",
+    "安徽省宣城市": "341800"
 }
 
 def get_df(path):

+ 13 - 13
jiangsu/gov_commodity_jiangsu_city.py

@@ -8,19 +8,19 @@ from utils.base_country_code import format_sql_value
 from utils.log import log
 
 city_code_map = {
-    "南京市": "3201",
-    "无锡市": "3202",
-    "徐州市": "3203",
-    "常州市": "3204",
-    "苏州市": "3205",
-    "南通市": "3206",
-    "连云港市": "3207",
-    "淮安市": "3208",
-    "盐城市": "3209",
-    "扬州市": "3210",
-    "镇江市": "3211",
-    "泰州市": "3212",
-    "宿迁市": "3213"
+    "南京市": "320100",
+    "无锡市": "320200",
+    "徐州市": "320300",
+    "常州市": "320400",
+    "苏州市": "320500",
+    "南通市": "320600",
+    "连云港市": "320700",
+    "淮安市": "320800",
+    "盐城市": "320900",
+    "扬州市": "321000",
+    "镇江市": "321100",
+    "泰州市": "321200",
+    "宿迁市": "321300"
 }
 
 ignore_city_code_arr = ['江阴市','宜兴市','常熟市','张家港市','昆山市','吴江市','太仓市','启东市','东台市','仪征市','丹阳市','兴化市']