Yixin Liu commited on
Commit
347b64a
·
1 Parent(s): 32b886e
Files changed (2) hide show
  1. backend.py +4 -4
  2. main.py +1 -1
backend.py CHANGED
@@ -37,8 +37,8 @@ def untar(fname, dirs):
37
  except Exception as e:
38
  print(e)
39
  return False
40
- def get_timestamp():
41
 
 
42
  ts = pd.to_datetime(str(datetime.datetime.now()))
43
  d = ts.strftime('%Y%m%d%H%M%S')
44
  return d
@@ -81,6 +81,6 @@ def download_source(pdf_lists=None,output_base=None,project_name=None,fetch_titl
81
  untar(filepath,outpath)
82
  archive_dir(out,os.path.join(base,project_name))
83
 
84
-
85
- # !unset https_proxy
86
- # !unset http_proxy
 
37
  except Exception as e:
38
  print(e)
39
  return False
 
40
 
41
+ def get_timestamp():
42
  ts = pd.to_datetime(str(datetime.datetime.now()))
43
  d = ts.strftime('%Y%m%d%H%M%S')
44
  return d
 
81
  untar(filepath,outpath)
82
  archive_dir(out,os.path.join(base,project_name))
83
 
84
+ if __name__ == '__main__':
85
+ s = get_timestamp()
86
+ print(s)
main.py CHANGED
@@ -41,7 +41,7 @@ if crawling_or_not:
41
  else:
42
  # parsing
43
  base='./download/'
44
- project_name = get_timestamp()
45
  base = os.path.join(base,project_name)
46
  make_dir_if_not_exist(base)
47
 
 
41
  else:
42
  # parsing
43
  base='./download/'
44
+ project_name = get_timestamp().replace(" ","-")
45
  base = os.path.join(base,project_name)
46
  make_dir_if_not_exist(base)
47