scripts
This commit is contained in:
@@ -76,7 +76,9 @@ def scrape():
|
||||
print("total:" + str(json_data['RECORDS']))
|
||||
for index, row in enumerate(json_data['ROWS']):
|
||||
print("index:"+str(index))
|
||||
part_number = row[0] # 部件编号
|
||||
table_id= get_md5(''.join([row[0], row[1], row[2]]))
|
||||
part_number =table_id # row[0] # 部件编号
|
||||
|
||||
file_links_str = row[4] # 文件链接
|
||||
|
||||
# 使用正则表达式分隔文件名
|
||||
@@ -229,8 +231,7 @@ def scrape():
|
||||
manufacturer=row[2]
|
||||
experiment_date=row[3]
|
||||
origin_data = ','.join(row)
|
||||
|
||||
data_db = [get_md5(''.join([device_name,device_function,manufacturer])), 'Crawler', datetime.now(), None, None, None,
|
||||
data_db = [table_id, 'Crawler', datetime.now(), None, None, None,
|
||||
device_type,
|
||||
device_name, device_mode,
|
||||
device_function,
|
||||
|
||||
Reference in New Issue
Block a user