Skip to content

Commit 62a8ded

Browse files
committed
Add token_v2 to environment
1 parent b0e03e6 commit 62a8ded

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/arguments/notion.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
import os
2-
import json
2+
import sys
33

44
from .utility import Utility
55
from .error import SearchError
66

7-
from selenium import webdriver
87
from selenium.webdriver.common.by import By
98
from selenium.webdriver.support.ui import WebDriverWait
109
from selenium.webdriver.support import expected_conditions as EC
@@ -73,7 +72,8 @@ def set_tokenv2_cookie(self):
7372
self.tokenv2_cookie = get_token_from_cookie(cookies, 'token_v2')
7473
except Exception as e:
7574
print(e)
76-
77-
def print_token_v2(self):
78-
self.set_tokenv2_cookie()
79-
print(self.tokenv2_cookie)
75+
self.tokenv2_cookie = None
76+
finally:
77+
os.environ['tokenv2_cookie'] = self.tokenv2_cookie
78+
if self.tokenv2_cookie:
79+
self.save_token_file()

0 commit comments

Comments
 (0)