|
@@ -5,17 +5,21 @@ import dataset
|
|
|
|
|
|
|
|
|
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/'
|
|
|
+
|
|
|
cursor=db.query('SELECT hdesigner_id FROM xoops._hdesigner where onoff=1; ')
|
|
|
for c in cursor:
|
|
|
- print(c['hdesigner_id'])
|
|
|
+ did=c['hdesigner_id']
|
|
|
+ print(did)
|
|
|
+ curdir=dir_prefix+str(did)
|
|
|
+ if not os.path.exists(curdir):
|
|
|
+ os.mkdir(curdir)
|
|
|
+
|
|
|
+ break
|
|
|
|
|
|
|
|
|
-#dir_prefix='/var/www/jared-faq/'
|
|
|
|
|
|
#for l in lst:
|
|
|
-# curdir=dir_prefix+l
|
|
|
-# if not os.path.exists(curdir):
|
|
|
-# os.mkdir(curdir)
|
|
|
# os.chdir(curdir)
|
|
|
# os.system('curl https://hhh.com.tw/columns/detail/'+l+'/ > index.html')
|
|
|
|