|
@@ -6,6 +6,8 @@ from selenium.webdriver.support.ui import WebDriverWait
|
|
|
from selenium.webdriver.common.by import By
|
|
|
from selenium.webdriver.support import expected_conditions as EC
|
|
|
from selenium.webdriver.common.keys import Keys
|
|
|
+db = dataset.connect('postgresql://postgres:eyJhbGciOiJI@172.105.241.163:5432/postgres')
|
|
|
+
|
|
|
#import undetected_chromedriver as uc
|
|
|
|
|
|
|
|
@@ -47,8 +49,27 @@ except:
|
|
|
#kw='真理大學國際生'
|
|
|
#domain='cia.au.edu.tw'
|
|
|
|
|
|
-kw='真理大學校友'
|
|
|
-domain='au.edu.tw'
|
|
|
+cursor=db.query("SELECT cust,plan,prefix,domain,kw,positive FROM public.seo_jobs where cust='真理' order by random() limit 1")
|
|
|
+kw=None
|
|
|
+domain=None
|
|
|
+for c in cursor:
|
|
|
+ cust=c['cust']
|
|
|
+ kw=c['kw']
|
|
|
+ plan=c['plan']
|
|
|
+ prefix=c['prefix']
|
|
|
+ domain=eval(c['domain'])[0]
|
|
|
+ positive=eval(c['positive'])
|
|
|
+ break
|
|
|
+#kw='真理大學教堂'
|
|
|
+#domain='udn.com'
|
|
|
+print(kw)
|
|
|
+print(domain)
|
|
|
+
|
|
|
+#kw='真理大學校友'
|
|
|
+#kw='真理大學國際生'
|
|
|
+#kw='真理大學張聰聯'
|
|
|
+#domain='au.edu.tw'
|
|
|
+#domain='pronews.tw'
|
|
|
|
|
|
driver.get('https://www.google.com?num=100')
|
|
|
time.sleep(3)
|