123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152 |
- import gsearch_general
- import sys
- import dataset
- import datetime
- db = dataset.connect('mysql://choozmo:pAssw0rd@db.ptt.cx:3306/seo?charset=utf8mb4')
- db_local = dataset.connect('mysql://root:jondae350@localhost:3306/db?charset=utf8mb4')
- table=db_local['test']
- driver=gsearch_general.restart_browser()
- #idx=gsearch_general.process_query(driver,'團購 email 牛',number_results=100,language_code='zh-TW')
- #idx=gsearch_general.process_query(driver,'site:facebook.com pages inurl:about 其他聯絡資訊 購',number_results=100,language_code='zh-TW')
- #idx=gsearch_general.process_query(driver,'聯絡我們 mailto 批發',number_results=100,language_code='zh-TW')
- #idx=gsearch_general.process_query(driver,'聯絡我們 mailto 蛋捲',number_results=100,language_code='zh-TW')
- #idx=gsearch_general.process_query(driver,'聯絡我們 mail 肉乾',number_results=100,language_code='zh-TW')
- #idx=gsearch_general.process_query(driver,'聯絡我們 mail 寵物',number_results=100,language_code='zh-TW')
- #idx=gsearch_general.process_query(driver,'聯絡我們 mail 雞精',number_results=100,language_code='zh-TW')
- #idx=gsearch_general.process_query(driver,'聯絡我們 mail 設計',number_results=100,language_code='zh-TW')
- #idx=gsearch_general.process_query(driver,'聯絡我們 mail 民宿',number_results=100,language_code='zh-TW')
- #idx=gsearch_general.process_query(driver,'聯絡我們 mail 面膜',number_results=100,language_code='zh-TW')
- #idx=gsearch_general.process_query(driver,'聯絡我們 mail 杏仁',number_results=100,language_code='zh-TW')
- #idx=gsearch_general.process_query(driver,'聯絡我們 mail 戶外',number_results=100,language_code='zh-TW')
- #idx=gsearch_general.process_query(driver,'聯絡我們 mail 嬰兒',number_results=100,language_code='zh-TW')
- #idx=gsearch_general.process_query(driver,'聯絡我們 mail 燈泡',number_results=100,language_code='zh-TW')
- #idx=gsearch_general.process_query(driver,'聯絡我們 mail 焦糖',number_results=100,language_code='zh-TW')
- #idx=gsearch_general.process_query(driver,'聯絡我們 mail 芝麻',number_results=100,language_code='zh-TW')
- #idx=gsearch_general.process_query(driver,'聯絡我們 mail 網購',number_results=100,language_code='zh-TW')
- #idx=gsearch_general.process_query(driver,'聯絡我們 mail 膠囊',number_results=100,language_code='zh-TW')
- #idx=gsearch_general.process_query(driver,'聯絡我們 mail 實業',number_results=100,language_code='zh-TW')
- #idx=gsearch_general.process_query(driver,'聯絡我們 mail 工作室',number_results=100,language_code='zh-TW')
- #idx=gsearch_general.process_query(driver,'聯絡我們 mail 企業社',number_results=100,language_code='zh-TW')
- #idx=gsearch_general.process_query(driver,'聯絡我們 mail 電商',number_results=100,language_code='zh-TW')
- #idx=gsearch_general.process_query(driver,'聯絡我們 mail 社會企業',number_results=100,language_code='zh-TW')
- #idx=gsearch_general.process_query(driver,'聯絡我們 mail 商城',number_results=100,language_code='zh-TW')
- #idx=gsearch_general.process_query(driver,'聯絡我們 mail 網頁 工作室',number_results=100,language_code='zh-TW')
- #idx=gsearch_general.process_query(driver,'聯絡我們 mail 媒合 平台',number_results=100,language_code='zh-TW')
- #idx=gsearch_general.process_query(driver,'聯絡我們 mail 跨境',number_results=100,language_code='zh-TW')
- #idx=gsearch_general.process_query(driver,'聯絡我們 mail 雜誌',number_results=100,language_code='zh-TW')
- #idx=gsearch_general.process_query(driver,'聯絡我們 mail 業配',number_results=100,language_code='zh-TW')
- #idx=gsearch_general.process_query(driver,'聯絡我們 mail 油壓',number_results=100,language_code='zh-TW')
- #idx=gsearch_general.process_query(driver,'聯絡我們 mail 工業',number_results=100,language_code='zh-TW')
- #idx=gsearch_general.process_query(driver,'聯絡我們 mail 餐廳',number_results=100,language_code='zh-TW')
- #idx=gsearch_general.process_query(driver,'聯絡我們 mail 宅配',number_results=100,language_code='zh-TW')
- #idx=gsearch_general.process_query(driver,'聯絡我們 mail 外套',number_results=100,language_code='zh-TW')
- #idx=gsearch_general.process_query(driver,'聯絡我們 mail 班服',number_results=100,language_code='zh-TW')
- #idx=gsearch_general.process_query(driver,'聯絡我們 mail 攝影',number_results=100,language_code='zh-TW')
- #idx=gsearch_general.process_query(driver,'聯絡我們 mail 牧場',number_results=100,language_code='zh-TW')
- #idx=gsearch_general.process_query(driver,'聯絡我們 mail 釣蝦',number_results=100,language_code='zh-TW')
- #idx=gsearch_general.process_query(driver,'聯絡我們 mail 新竹',number_results=100,language_code='zh-TW')
- #idx=gsearch_general.process_query(driver,'聯絡我們 mail 竹北',number_results=100,language_code='zh-TW')
- #idx=gsearch_general.process_query(driver,'聯絡我們 mail 竹東',number_results=100,language_code='zh-TW')
- #idx=gsearch_general.process_query(driver,'聯絡我們 mail 竹南',number_results=100,language_code='zh-TW')
- #idx=gsearch_general.process_query(driver,'聯絡我們 mail 幼兒',number_results=100,language_code='zh-TW')
- #idx=gsearch_general.process_query(driver,'聯絡我們 mail 樂器',number_results=100,language_code='zh-TW')
- #idx=gsearch_general.process_query(driver,'聯絡我們 mail 創意',number_results=100,language_code='zh-TW')
- #idx=gsearch_general.process_query(driver,'聯絡我們 mail 出口',number_results=100,language_code='zh-TW')
- #idx=gsearch_general.process_query(driver,'聯絡我們 mail 器材',number_results=100,language_code='zh-TW')
- #idx=gsearch_general.process_query(driver,'聯絡我們 mail 零件',number_results=100,language_code='zh-TW')
- #idx=gsearch_general.process_query(driver,'聯絡我們 mail 零組件',number_results=100,language_code='zh-TW')
- #idx=gsearch_general.process_query(driver,'聯絡我們 mail 精密',number_results=100,language_code='zh-TW')
- #idx=gsearch_general.process_query(driver,'聯絡我們 mail 中藥',number_results=100,language_code='zh-TW')
- #idx=gsearch_general.process_query(driver,'聯絡我們 mail 聯誼會',number_results=100,language_code='zh-TW')
- #idx=gsearch_general.process_query(driver,'聯絡我們 mail 建築',number_results=100,language_code='zh-TW')
- #idx=gsearch_general.process_query(driver,'聯絡我們 mail 代銷',number_results=100,language_code='zh-TW')
- #idx=gsearch_general.process_query(driver,'聯絡我們 mail 生前',number_results=100,language_code='zh-TW')
- #idx=gsearch_general.process_query(driver,'聯絡我們 mail 保經',number_results=100,language_code='zh-TW')
- #idx=gsearch_general.process_query(driver,'聯絡我們 mail 人本',number_results=100,language_code='zh-TW')
- #idx=gsearch_general.process_query(driver,'聯絡我們 mail 生命',number_results=100,language_code='zh-TW')
- #idx=gsearch_general.process_query(driver,'聯絡我們 mail 醫美',number_results=100,language_code='zh-TW')
- #idx=gsearch_general.process_query(driver,'聯絡我們 mail 幹細胞',number_results=100,language_code='zh-TW')
- #idx=gsearch_general.process_query(driver,'聯絡我們 mail 減重',number_results=100,language_code='zh-TW')
- #idx=gsearch_general.process_query(driver,'聯絡我們 mail 醫材',number_results=100,language_code='zh-TW')
- #idx=gsearch_general.process_query(driver,'聯絡我們 mail 婚紗',number_results=100,language_code='zh-TW')
- #idx=gsearch_general.process_query(driver,'聯絡我們 mail 月子',number_results=100,language_code='zh-TW')
- #idx=gsearch_general.process_query(driver,'聯絡我們 mail 製藥',number_results=100,language_code='zh-TW')
- #idx=gsearch_general.process_query(driver,'聯絡我們 mail 貿易',number_results=100,language_code='zh-TW')
- #idx=gsearch_general.process_query(driver,'聯絡我們 mail 油品',number_results=100,language_code='zh-TW')
- #idx=gsearch_general.process_query(driver,'聯絡我們 mail 建材',number_results=100,language_code='zh-TW')
- #idx=gsearch_general.process_query(driver,'聯絡我們 mail 清潔',number_results=100,language_code='zh-TW')
- #idx=gsearch_general.process_query(driver,'聯絡我們 mail 化學',number_results=100,language_code='zh-TW')
- #idx=gsearch_general.process_query(driver,'聯絡我們 mail 檢驗',number_results=100,language_code='zh-TW')
- #idx=gsearch_general.process_query(driver,'聯絡我們 mail 蛋糕',number_results=100,language_code='zh-TW')
- #idx=gsearch_general.process_query(driver,'聯絡我們 mail 旅館',number_results=100,language_code='zh-TW')
- #idx=gsearch_general.process_query(driver,'聯絡我們 mail 回收',number_results=100,language_code='zh-TW')
- #idx=gsearch_general.process_query(driver,'聯絡我們 mail 高爾夫',number_results=100,language_code='zh-TW')
- #idx=gsearch_general.process_query(driver,'聯絡我們 mail 雷射切割',number_results=100,language_code='zh-TW')
- #idx=gsearch_general.process_query(driver,'聯絡我們 mail 飲茶',number_results=100,language_code='zh-TW')
- #idx=gsearch_general.process_query(driver,'聯絡我們 mail 連鎖',number_results=100,language_code='zh-TW')
- #idx=gsearch_general.process_query(driver,'聯絡我們 mail 加盟',number_results=100,language_code='zh-TW')
- #idx=gsearch_general.process_query(driver,'聯絡我們 mail 早午餐',number_results=100,language_code='zh-TW')
- #idx=gsearch_general.process_query(driver,'聯絡我們 mail 藥局',number_results=100,language_code='zh-TW')
- #idx=gsearch_general.process_query(driver,'聯絡我們 mail 廣告',number_results=100,language_code='zh-TW')
- #idx=gsearch_general.process_query(driver,'聯絡我們 mail 代表',number_results=100,language_code='zh-TW')
- #idx=gsearch_general.process_query(driver,'聯絡我們 mail 當鋪',number_results=100,language_code='zh-TW')
- #idx=gsearch_general.process_query(driver,'聯絡我們 after:2021-10-01 before:2021-11-01 數位',number_results=100,language_code='zh-TW')
- #idx=gsearch_general.process_query(driver,'site:facebook.com inurl:about 聯絡資訊 開幕',number_results=100,language_code='zh-TW')
- #idx=gsearch_general.process_query(driver,'聯絡我們 mail 廣告投放',number_results=100,language_code='zh-TW')
- #idx=gsearch_general.process_query(driver,'聯絡我們 mail 行銷',number_results=100,language_code='zh-TW')
- #idx=gsearch_general.process_query(driver,'聯絡我們 mail 看板',number_results=100,language_code='zh-TW')
- #idx=gsearch_general.process_query(driver,'聯絡我們 mail 管理 顧問',number_results=100,language_code='zh-TW')
- #idx=gsearch_general.process_query(driver,'聯絡我們 mail 派報',number_results=100,language_code='zh-TW')
- #idx=gsearch_general.process_query(driver,'聯絡我們 mail 書局',number_results=100,language_code='zh-TW')
- #idx=gsearch_general.process_query(driver,'聯絡我們 mail 商 協會',number_results=100,language_code='zh-TW')
- #idx=gsearch_general.process_query(driver,'聯絡我們 mail 車行',number_results=100,language_code='zh-TW')
- #idx=gsearch_general.process_query(driver,'聯絡我們 mail 預約',number_results=100,language_code='zh-TW')
- #idx=gsearch_general.process_query(driver,'聯絡我們 mail 美甲',number_results=100,language_code='zh-TW')
- #idx=gsearch_general.process_query(driver,'聯絡我們 mail 髮型',number_results=100,language_code='zh-TW')
- #idx=gsearch_general.process_query(driver,'聯絡我們 mail 軟體',number_results=100,language_code='zh-TW')
- #idx=gsearch_general.process_query(driver,'聯絡我們 mail 肥料',number_results=100,language_code='zh-TW')
- #idx=gsearch_general.process_query(driver,'聯絡我們 mail 堅果',number_results=100,language_code='zh-TW')
- #idx=gsearch_general.process_query(driver,'聯絡我們 mail 果乾',number_results=100,language_code='zh-TW')
- #idx=gsearch_general.process_query(driver,'聯絡我們 mail 安親',number_results=100,language_code='zh-TW')
- #idx=gsearch_general.process_query(driver,'聯絡我們 mail 運輸',number_results=100,language_code='zh-TW')
- #idx=gsearch_general.process_query(driver,'聯絡我們 mail 工程顧問',number_results=100,language_code='zh-TW')
- #idx=gsearch_general.process_query(driver,'聯絡我們 mail 園藝',number_results=100,language_code='zh-TW')
- #idx=gsearch_general.process_query(driver,'聯絡我們 mail 日式料理',number_results=100,language_code='zh-TW')
- #idx=gsearch_general.process_query(driver,'聯絡我們 mail 泰式料理',number_results=100,language_code='zh-TW')
- #idx=gsearch_general.process_query(driver,'聯絡我們 mail 法式料理',number_results=100,language_code='zh-TW')
- #idx=gsearch_general.process_query(driver,'聯絡我們 mail 清真料理',number_results=100,language_code='zh-TW')
- #idx=gsearch_general.process_query(driver,'聯絡我們 mail 烘焙',number_results=100,language_code='zh-TW')
- #idx=gsearch_general.process_query(driver,'聯絡我們 mail 磁磚',number_results=100,language_code='zh-TW')
- #idx=gsearch_general.process_query(driver,'聯絡我們 mail 命理',number_results=100,language_code='zh-TW')
- #idx=gsearch_general.process_query(driver,'聯絡我們 mail 改運',number_results=100,language_code='zh-TW')
- # idx=gsearch_general.process_query(driver,'聯絡我們 mail 風水',number_results=100,language_code='zh-TW')
- <<<<<<< HEAD
- idx=gsearch_general.process_query(driver,'聯絡我們 mail 公益',number_results=100,language_code='zh-TW')
- =======
- # idx=gsearch_general.process_query(driver,'聯絡我們 mail 公益',number_results=100,language_code='zh-TW')
- idx=gsearch_general.process_query(driver,'聯絡我們 區塊鏈',number_results=100,language_code='zh-TW')
- >>>>>>> 604b4f0737fe7f055de28e84a0a4697a346701cf
- print(idx)
- for x in idx:
- x['dt']=datetime.datetime.now()
- <<<<<<< HEAD
- =======
- x['tag']='區塊鏈2'
- print(x)
- >>>>>>> 604b4f0737fe7f055de28e84a0a4697a346701cf
- table.insert(x)
- if idx==None:
- print(driver.page_source)
- if '我們的系統偵測到您的電腦網路送出的流量有異常情況' in driver.page_source:
- print('baned.....')
- sys.exit()
|