提交 58db05cc 作者: LiuLiYuan

Merge remote-tracking branch 'origin/master'

......@@ -85,7 +85,22 @@ if __name__=='__main__':
ein = jsonData['ein'] # 联邦税号
address = jsonData['addresses']
city = address['business']['city']
business_address = address['business']['street1'] + ',' + city + ' ' + address['business']['stateOrCountryDescription']
try:
if city:
business_address = address['business']['street1'] + ',' + city + ' ' + address['business'][
'stateOrCountryDescription']
else:
business_address = address['business']['stateOrCountryDescription']
except:
try:
business_address = address['business']['street1'] + ',' + city
except:
try:
business_address = city + ' ' + address['business']['stateOrCountryDescription']
except:
business_address = ''
# city = address['business']['city']
# business_address = address['business']['street1'] + ',' + city + ' ' + address['business']['stateOrCountryDescription']
phone = jsonData['phone'] # 电话
try:
formerNames = jsonData['formerNames'][0]['name'] # 曾用名
......
"""
"""
......@@ -176,7 +176,8 @@ def get_info(social_code, com_code,info_date,delist_all,info_date_list,taskType)
dic_info_zcfzb = {
"name": info_name,
'enName': info_name_en,
"value": info_data
"value": info_data,
"unit": "元"
}
list_zcfzb.append(dic_info_zcfzb)
......@@ -202,7 +203,8 @@ def get_info(social_code, com_code,info_date,delist_all,info_date_list,taskType)
dic_info_lrb = {
"name": info_name,
'enName': info_name_en,
"value": info_data
"value": info_data,
"unit": "元"
}
list_lrb.append(dic_info_lrb)
......@@ -228,7 +230,8 @@ def get_info(social_code, com_code,info_date,delist_all,info_date_list,taskType)
dic_info_xjllb = {
"name": info_name,
'enName': info_name_en,
"value": info_data
"value": info_data,
"unit": "元"
}
list_xjllb.append(dic_info_xjllb)
......@@ -356,7 +359,8 @@ def get_info(social_code, com_code,info_date,delist_all,info_date_list,taskType)
dic_info_zcfzb = {
"name": info_name,
'enName': info_name_en,
"value": info_data
"value": info_data,
"unit": '元'
}
list_zcfzb.append(dic_info_zcfzb)
......@@ -382,7 +386,8 @@ def get_info(social_code, com_code,info_date,delist_all,info_date_list,taskType)
dic_info_lrb = {
"name": info_name,
'enName': info_name_en,
"value": info_data
"value": info_data,
'unit': '元'
}
list_lrb.append(dic_info_lrb)
......@@ -408,7 +413,8 @@ def get_info(social_code, com_code,info_date,delist_all,info_date_list,taskType)
dic_info_xjllb = {
"name": info_name,
'enName': info_name_en,
"value": info_data
"value": info_data,
'unit':'元'
}
list_xjllb.append(dic_info_xjllb)
......
......@@ -33,7 +33,7 @@ def updatewxLink(link,info_source_code,state):
def getjsonInfo():
#从数据库中获取信息 一条
select_sql = "select * from wx_link where state=100 order by id asc limit 1"
select_sql = "select * from wx_link where state=0 order by id asc limit 1"
cursor_.execute(select_sql)
row = cursor_.fetchone()
cnx_.commit()
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论