|
@@ -17,7 +17,8 @@ import json
|
|
|
|
|
|
driver=None
|
|
|
|
|
|
-db = dataset.connect('mysql://choozmo:pAssw0rd@db.ptt.cx:3306/seo?charset=utf8mb4')
|
|
|
+db = dataset.connect('postgresql://postgres:eyJhbGciOiJI@172.105.241.163:5432/postgres')
|
|
|
+
|
|
|
table=db['nda_log']
|
|
|
path = 'C:/ChromeDriver' #pls adjust
|
|
|
path_z = 'C:/ChromeDriver' #pls adjust
|
|
@@ -35,8 +36,8 @@ def restart_browser():
|
|
|
|
|
|
resultdict={'搜尋詞':[],'網域':[],'結果標題':[],'結果網址':[],'結果名次':[]}
|
|
|
|
|
|
-def pickterm(client):
|
|
|
- ds=db.query('select json from seo.seo_jobs where cust="' + client + '" order by rand() limit 1')
|
|
|
+def pickterm(client): # OLD TABLE NAME: seo.seo_jobs
|
|
|
+ ds=db.query("select json from public.seo_jobs_temp where cust='" + client + "' order by random() limit 1")
|
|
|
#TAG ABOVE AND UNTAG BELOW FOR DEBUG
|
|
|
#ds=hhhdb.query('select * from seo.seo_articles where cust=')
|
|
|
|