seltest.py 577 B

12345678910111213141516171819
  1. import sys
  2. sys.path.insert(0,'./kw_tools/web')
  3. import browser_common
  4. jb=browser_common.JBrowser()
  5. #jb.set_profile_path('/home/jared/.config/google-chrome/Default/')
  6. jb.set_profile_path('"/home/jared/.config/google-chrome/"')
  7. #jb.get('http://www.yahoo.com.tw')
  8. #jb.get('https://data.similarweb.com/api/v1/data?domain=hhh.com.tw')
  9. #jb.get('https://data.similarweb.com/api/v1/data?domain=yahoo.com.tw')
  10. jb.get('https://www.similarweb.com/website/google.com/')
  11. driver=jb.get_driver()
  12. #class="websiteRanks-valueContainer js-websiteRanksValue"
  13. src=driver.page_source
  14. print(src)