faq_gen.py 426 B

123456789101112131415161718
  1. #!/usr/bin/python3
  2. import os
  3. import codecs
  4. lst=['5926','5878','5912','5939','5885','4300','1042','3559']
  5. #lst=['5926']
  6. dir_prefix='/var/www/jared-faq/'
  7. for l in lst:
  8. curdir=dir_prefix+l
  9. if not os.path.exists(curdir):
  10. os.mkdir(curdir)
  11. os.chdir(curdir)
  12. # os.system('curl https://hhh.com.tw/columns/detail/'+l+'/ > index.html')
  13. os.system('curl https://hhh.com.tw/orig_column/'+l+'/ > index.html')