Browse Source

hhh點擊網頁:clickbot_100

zooeytsai 2 năm trước cách đây
mục cha
commit
2d5df86ebb
1 tập tin đã thay đổi với 4 bổ sung3 xóa
  1. 4 3
      SEO/clickbot_100.py

+ 4 - 3
SEO/clickbot_100.py

@@ -37,10 +37,11 @@ def restart_browser():
 
 
 def process_one():
-    db = dataset.connect('mysql://root:jondae350@localhost:3306/ig_tags?charset=utf8mb4')
+    db = dataset.connect('mysql://choozmo:pAssw0rd@db.ptt.cx:3306/seo?charset=utf8mb4')
     lst=[]
     table=db['google_rank']
-    cursor=db.query('select term from selected_kw and term not in (SELECT distinct(keyword) FROM ig_tags.save_result where url like "%beastparadise.net%" and datediff(now(),dt)=0)')
+    cursor = db.query('select term from seo.selected_kw')
+    # cursor=db.query('select term from selected_kw and term not in (SELECT distinct(keyword) FROM ig_tags.save_result where url like "%beastparadise.net%" and datediff(now(),dt)=0)')
     for c in cursor:
         lst.append(c['term'])
 
@@ -57,7 +58,7 @@ def process_one():
     fname=term.replace(' ','_')
     # driver.save_screenshot('c:/tmp/seo/'+fname+'.png')
     df=pd.DataFrame()
-
+    # driver.get_screenshot_as_file("/Users/zooeytsai/排名100.png")
     elmts=driver.find_elements_by_xpath("//div[@class='yuRUbf']/a")
 
     clickelmt=None