zooey 7 ヶ月 前
コミット
1fe0990d47
3 ファイル変更9 行追加8 行削除
  1. 3 3
      SEO/click_negative.py
  2. 4 3
      SEO/clickbot_100_one.py
  3. 2 2
      SEO/ranking_report.py

+ 3 - 3
SEO/click_negative.py

@@ -56,7 +56,7 @@ def re_get_webdriver():
         print('quit....')
         driver = None
     try:
-        s = Service('/Users/mac/Downloads/125/chromedriver')
+        s = Service('/Users/mac/Downloads/127/chromedriver')
         options = webdriver.ChromeOptions()
         options.add_argument('--headless')
 
@@ -206,7 +206,7 @@ def run_once(jsobj):
 while True:
 
 
-    # cursor = db.query("select * from public.seo where cust='信義房屋' and type is NULL order by random() limit 1")
+    # cursor = db.query("select * from public.seo where cust='百威' and type is NULL order by random() limit 1")
     cursor = db.query("select * from public.seo where cust='信義房屋' and type='vi' order by random() limit 1")
     # cursor = db.query("select * from public.seo where id=627")
     cursor_n = db.query("select * from public.neg_word where client='信義房屋'")
@@ -216,7 +216,7 @@ while True:
         kw = c['kw']
         domain = c['domain']
 
-    d = {'啟翔':0,'加百裕':0,'富玉':0,'信義房屋':0,'真理大學':0,'驊揚':0}
+    d = {'信義房屋':0,'真理大學':0,'驊揚':0,'百威':0}
     for c in cursor_d:
         if c['cust'] in d.keys():
             d[c['cust']]+=1

+ 4 - 3
SEO/clickbot_100_one.py

@@ -25,7 +25,7 @@ driver = None
 def restart_browser():
     global driver
     user_agent = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36'
-    s = Service('/Users/mac/Downloads/125/chromedriver')
+    s = Service('/Users/mac/Downloads/127/chromedriver')
     options = webdriver.ChromeOptions()
     options.add_argument('--headless')
     # options.add_argument('--remote-debugging-port=9222')
@@ -50,9 +50,9 @@ def process_one():
     # lst = ['富玉珠寶','富玉珠寶有限公司']
     # lst = ['台北牙周病醫生推薦 ','微創水雷射','水雷射牙周病']
     # lst = ['真理大學 site:ptt.cc','真理大學 site:dcard.tw']
-    # lst = ['涼夏清爽','夏季口罩','石墨烯','透氣 口罩','夏天口罩推薦','夏天立體口罩']
+    # lst = ['高雄 全 戶 軟水','高雄 淨水器推薦','淨水系統 高雄']
     # lst = ['啟翔輕金屬','啟翔','陳百欽']
-    date='0529'
+    date='0731'
 
     for term in lst:
         driver=restart_browser()
@@ -101,6 +101,7 @@ def process_one():
         driver.quit()
         print('等待')
         time.sleep(random.randint(80,90))
+
 process_one()
 
 

+ 2 - 2
SEO/ranking_report.py

@@ -3,8 +3,8 @@ import dataset
 import pymysql
 pymysql.install_as_MySQLdb()
 
-name='新飛'
-date = '0528'
+name='好晴天'
+date = '0731'
 
 
 def day():