|
@@ -45,11 +45,11 @@ def process_one():
|
|
db = dataset.connect('mysql://choozmo:pAssw0rd@db.ptt.cx:3306/seo?charset=utf8mb4')
|
|
db = dataset.connect('mysql://choozmo:pAssw0rd@db.ptt.cx:3306/seo?charset=utf8mb4')
|
|
lst=[]
|
|
lst=[]
|
|
table=db['google_rank']
|
|
table=db['google_rank']
|
|
- # cursor = db.query('select term,domain from seo.selected_kw where client="soapdays"')
|
|
|
|
|
|
+ cursor = db.query('select term,domain from seo.selected_kw where client="CLIQ露營椅"')
|
|
# cursor = db.query('select term,url from seo.sns_kw where client="英雄難國美人酒"')
|
|
# cursor = db.query('select term,url from seo.sns_kw where client="英雄難國美人酒"')
|
|
- # cursor = db.query('select term from seo.selected_kw where client="薇懠"')
|
|
|
|
|
|
+ # cursor = db.query('select term from seo.selected_kw where client="plantA"')
|
|
# cursor = db.query('select term,domain from seo.select_kw where id between 2216 and 2255')
|
|
# cursor = db.query('select term,domain from seo.select_kw where id between 2216 and 2255')
|
|
- # cursor = db.query('select term,domain from seo.select_kw where client="純皂生活"')
|
|
|
|
|
|
+ # cursor = db.query('select term,domain from seo.select_kw where client="only實驗教育"')
|
|
# 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 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:
|
|
for c in cursor:
|
|
lst.append([c['term'],c['domain']])
|
|
lst.append([c['term'],c['domain']])
|
|
@@ -63,7 +63,7 @@ def process_one():
|
|
driver.get(googleurl)
|
|
driver.get(googleurl)
|
|
time.sleep(60)
|
|
time.sleep(60)
|
|
print(driver.current_url)
|
|
print(driver.current_url)
|
|
- driver.save_screenshot('C:\/Users\/s1301\/Pictures\/Saved Pictures\/soapdays\/'+i[0]+'.png')
|
|
|
|
|
|
+ driver.save_screenshot('C:\/Users\/s1301\/Pictures\/Saved Pictures\/'+i[0]+'.png')
|
|
df=pd.DataFrame()
|
|
df=pd.DataFrame()
|
|
elmts=driver.find_elements(By.XPATH,"//div[@class='yuRUbf']/a")
|
|
elmts=driver.find_elements(By.XPATH,"//div[@class='yuRUbf']/a")
|
|
print('結果數量',len(elmts))
|
|
print('結果數量',len(elmts))
|
|
@@ -93,7 +93,7 @@ def process_one():
|
|
df['結果網址']=datadict['結果網址']
|
|
df['結果網址']=datadict['結果網址']
|
|
df['結果名次']=datadict['結果名次']
|
|
df['結果名次']=datadict['結果名次']
|
|
|
|
|
|
- df.to_excel('C:\/Users\/s1301\/Pictures\/Saved Pictures\soapdays\/'+i[0]+".xls")
|
|
|
|
|
|
+ # df.to_excel('C:\/Users\/s1301\/Pictures\/Saved Pictures\soapdays\/'+i[0]+".xls")
|
|
|
|
|
|
driver.quit()
|
|
driver.quit()
|
|
print('等待')
|
|
print('等待')
|