|
@@ -4,11 +4,18 @@ import codecs
|
|
|
import dataset
|
|
|
|
|
|
|
|
|
-def proc_file(fname):
|
|
|
+def proc_file(fname,fname2):
|
|
|
fr=codecs.open(fname,'r','utf-8')
|
|
|
+ fw=codecs.open(fname2,'w','utf-8')
|
|
|
lines=fr.readlines()
|
|
|
+ for l in lines:
|
|
|
+ fw.write(l)
|
|
|
+ if '</script>' in l:
|
|
|
+ fw.write("\n")
|
|
|
+ fw.write("jared...")
|
|
|
print(lines)
|
|
|
fr.close()
|
|
|
+ fw.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/'
|
|
@@ -21,8 +28,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/'+str(did)+'/1-page/new-sort/ -o index.html')
|
|
|
- proc_file(curdir+"/index.html")
|
|
|
+ os.system('curl https://hhh.com.tw/designers/cases/'+str(did)+'/1-page/new-sort/ -o orig.html')
|
|
|
+ proc_file(curdir+"/orig.html")
|
|
|
break
|
|
|
|
|
|
|