zooeytsai 2 년 전
부모
커밋
2f3d83b61d
1개의 변경된 파일3개의 추가작업 그리고 13개의 파일을 삭제
  1. 3 13
      test_ip.py

+ 3 - 13
test_ip.py

@@ -27,17 +27,6 @@ import requests
 driver = None
 
 
-headers = {
-    "Authorization": "Bearer " + "6SDULL1Ebklduc6TFxa97AFto5Sj21kyJ30CxiLiSoi",
-    "Content-Type": "application/x-www-form-urlencoded"
-}
-
-
-def send_msg(kw):
-    params = {"message": kw}
-    r = requests.post("https://notify-api.line.me/api/notify", headers=headers, params=params)
-
-
 def re_get_webdriver():
     global port
     global driver
@@ -76,8 +65,9 @@ def re_get_webdriver():
         return None
 
 
-def run_once(jsobj):
+def run_once():
     global driver
+    re_get_webdriver()
     driver.get('https://api.ipify.org/')
     time.sleep(3)
     ip_address = driver.find_element(By.TAG_NAME, "body").text
@@ -85,4 +75,4 @@ def run_once(jsobj):
     driver.quit()
 
 
-
+run_once()