|
|
@ -174,6 +174,11 @@ def write2csv(response, filename_csv): # 写入到csv文件
|
|
|
|
fd.write(itemString)
|
|
|
|
fd.write(itemString)
|
|
|
|
|
|
|
|
|
|
|
|
try:
|
|
|
|
try:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dir = "Catalogues"
|
|
|
|
|
|
|
|
if not os.path.exists(dir):
|
|
|
|
|
|
|
|
os.mkdir(dir)
|
|
|
|
|
|
|
|
|
|
|
|
if os.path.exists(filename_csv):
|
|
|
|
if os.path.exists(filename_csv):
|
|
|
|
with open(filename_csv, 'a+', encoding = 'utf-8-sig') as fd: # 存在,文件尾追加
|
|
|
|
with open(filename_csv, 'a+', encoding = 'utf-8-sig') as fd: # 存在,文件尾追加
|
|
|
|
writer(fd)
|
|
|
|
writer(fd)
|
|
|
|