N2T icon indicating copy to clipboard operation
N2T copied to clipboard

크롬에서 로그인했음에도 인증페이지로 넘어가는것 같습니다.

Open qkrtkdwns3410 opened this issue 1 year ago • 1 comments

Traceback (most recent call last):
  File "C:\Users\ipeac\IdeaProjects\N2T\main.py", line 168, in <module>
    client = Notion2Tistory(cfg, sleep_time=5, selenium_debug=False)
  File "C:\Users\ipeac\IdeaProjects\N2T\main.py", line 56, in __init__
    authorize_code = self.s_client.get_tistory_authorize_code(cfg.TISTORY.CLIENT_ID, cfg.TISTORY.REDIRECT_URI)
  File "C:\Users\ipeac\IdeaProjects\N2T\clients\SeleniumClient.py", line 76, in get_tistory_authorize_code
    code = soup.script.text.split('code=')[1].split('&state')[0]
IndexError: list index out of range
    def get_tistory_authorize_code(self, client_id, redirect_uri):
        # 인증 url로 이동 (선행으로 로그인이 되어있어야 함)
        authorize_url = f'https://www.tistory.com/oauth/authorize?client_id={client_id}&redirect_uri={redirect_uri}&response_type=code'
        self.driver.get(authorize_url)

        resp = self.driver.page_source
        soup = BeautifulSoup(resp, 'html.parser')

        code = soup.script.text.split('code=')[1].split('&state')[0]

        return code

크롬에서 로그인했음에도 로그인처리가 안되는 것 같습니다.. ㅇ.ㅇ

일단 soup 쪽 scipt.text 가 공백값이 넘어옵니다.

인텔리제이업데이트 이후에 문제가 발생했고 파이썬 버전도 원래 쓰던 그대로입니다.

qkrtkdwns3410 avatar Oct 13 '23 11:10 qkrtkdwns3410

카카오 2차인증 문제였습니다; 분명히 2차인증 해제했는데, 어느순간에 다시 켜져있네요..?

인증을 아주 귀찮아 하는 사람이라, 인증을 스스로 켰을리는 없는데..

qkrtkdwns3410 avatar Oct 15 '23 05:10 qkrtkdwns3410