Your Name 3 anos atrás
pai
commit
209a6f45bf
1 arquivos alterados com 8 adições e 2 exclusões
  1. 8 2
      designer/designer_gen.py

+ 8 - 2
designer/designer_gen.py

@@ -4,6 +4,12 @@ import codecs
 import dataset
 
 
+def proc_file(fname):
+    fr=codecs.open(fname,'r','utf-8')
+    lines=fr.readlines()
+    print(lines)
+    fr.close()
+
 db = dataset.connect('mysql://hhh7796hhh:lYmWsu^ujcA1@hhh-v57-cluster.cluster-cmab1ctkglka.ap-northeast-2.rds.amazonaws.com:3306/xoops?charset=utf8mb4')
 dir_prefix='/var/www/jared-six/'
 
@@ -15,8 +21,8 @@ for c in cursor:
     if not os.path.exists(curdir):
         os.mkdir(curdir)
     os.chdir(curdir)
-    os.system('curl https://hhh.com.tw/designers/cases/'+did+'/1-page/new-sort/ -o index.html')
-
+    os.system('curl https://hhh.com.tw/designers/cases/'+str(did)+'/1-page/new-sort/ -o index.html')
+    proc_file(curdir+"/index.html")
     break