def _get_icp(dt,icp_code):
#?“??”???????
_tmp_list = dt.split(u'\u8be6\u7ec6\r\n')
for one_record in _tmp_list:
_tmp_record = {}
one_record = one_record.split('\t')
_tmp_domainlist = one_record[5].split('\r\n')
for _tmp_domain in _tmp_domainlist:
if len(_tmp_domain.strip()) > 3:
#????
_tmp_record['domain_name'] = _tmp_domain
#??????
_tmp_record['co_name'] = one_record[1]
#?????? ??/??
_tmp_record['domain_type'] = one_record[2]
#????
_tmp_record['domain_title'] = one_record[4]
#????
_tmp_record['check_time'] = one_record[6]
#????
#icp_code = models.TextField(null=True, blank=True)
#?????
_tmp_record['icp_code_2'] = one_record[3]
#??IDleo???
#beian_id = one_record[]
#insert_time = models.DateTimeField(null=True, blank=True)
#print _tmp_record
_t = ICPCheck(domain_name =_tmp_record['domain_name'],co_name = _tmp_record['co_name'],domain_type = _tmp_record['domain_type'],domain_title = _tmp_record['domain_title'] ,check_time = _tmp_record['check_time'],icp_code = icp_code ,icp_code_2 = _tmp_record['icp_code_2'],byhand = 1)
_t.save()
# end if
# end for
# end for
transaction.commit()
# end def _get_icp
评论列表
文章目录