hhh_kw.py 731 B

1234567891011121314151617181920212223242526272829303132
  1. from selenium import webdriver
  2. import time
  3. import networkx as nx
  4. import dataset
  5. import pickle
  6. import codecs
  7. from selenium.webdriver.common import keys
  8. from selenium.webdriver.common.keys import Keys
  9. import sys
  10. import os
  11. import time
  12. import re
  13. import jieba
  14. import jinja2
  15. from browser_common import JBrowser
  16. db = dataset.connect('sqlite:///:memory:')
  17. if os.name=='nt':
  18. jieba.load_userdict('C:\\src\\farmcodes\\jared\\browser\\dict.txt')
  19. jieba.load_userdict('C:\\tmp\\dict.txt')
  20. table=db['tmp']
  21. #db.query('delete from ranking')
  22. #db.query('delete from hhh_ranking')
  23. jb=JBrowser()
  24. jb.set_profile_path("Profile 7")
  25. kw='收納'
  26. googleurl='https://www.google.com/search?q='+kw
  27. jb.get(googleurl)