jared 3 months ago
parent
commit
2c106ad8b5
1 changed files with 3 additions and 1 deletions
  1. 3 1
      deployment/selwire_click.py

+ 3 - 1
deployment/selwire_click.py

@@ -139,6 +139,8 @@ def selenium_jared_click():
     print('搜尋結果數量',numresults)
     if numresults<=0:
         print(elmts)
+    table=db['seo_jobs_ranking_jared']
+
     cnt=1
     for elmt in elmts:
         href=elmt.get_attribute('href')
@@ -154,7 +156,7 @@ def selenium_jared_click():
             webdriver.ActionChains(driver).move_to_element(elmt).click().perform()
             print(domain)
             print(href)
-            table=db['seo_jobs_ranking_jared']
+            print('ranking'+str(cnt))
             table.insert({'ranking':cnt,'kw':kw,'results':numresults,'url':href,'title':txt})
 
             driver.quit()