Your Name 4 gadi atpakaļ
vecāks
revīzija
7ab1606222
2 mainītis faili ar 14 papildinājumiem un 1 dzēšanām
  1. 11 0
      tests/rtest.py
  2. 3 1
      tests/seltest.py

+ 11 - 0
tests/rtest.py

@@ -0,0 +1,11 @@
+import requests
+from selenium import webdriver
+driver = webdriver.PhantomJS()
+driver.get('https://data.similarweb.com/api/v1/data?domain=yahoo.com.tw')
+cnt=driver.page_source
+print(cnt)
+driver.quit()
+#r = requests.get('https://data.similarweb.com/api/v1/data?domain=yahoo.com.tw')
+#print(r.content)
+#js=r.json()
+#print(js)

+ 3 - 1
tests/seltest.py

@@ -2,6 +2,8 @@ import sys
 sys.path.insert(0,'./kw_tools/web')
 import browser_common
 jb=browser_common.JBrowser()
-jb.set_profile_path('/home/jared/.config/google-chrome/Default/')
+#jb.set_profile_path('/home/jared/.config/google-chrome/Default/')
+jb.set_profile_path('/home/jared/.config/google-chrome/Profile 1/')
+
 jb.get('http://www.yahoo.com.tw')