N2T icon indicating copy to clipboard operation
N2T copied to clipboard

beautifulsoup4 버전 4.9.0~ script.text 문제

Open wonslee opened this issue 2 years ago • 0 comments

안녕하세요 정말 유용하게 쓰고 있습니다!! beautifulsoup4 4.9.0 버전에 따라 script.text -> script.string로 변경되었다고 합니다.

Traceback (most recent call last):
  File "main.py", line 170, in <module>
    client = Notion2Tistory(cfg, sleep_time=5, selenium_debug=False)
  File "main.py", line 59, in __init__
    authorize_code = self.s_client.get_tistory_authorize_code(
  File "/home/wslee/all-codes/blog/N2T/clients/SeleniumClient.py", line 89, in get_tistory_authorize_code
    code = soup.script.text.split('code=')[1].split('&state')[0]
IndexError: list index out of range

제 환경입니다.

ubuntu22.04
python3.8
pip 20.0.2
beautifulsoup4           4.9.3

레퍼런스입니다. https://stackoverflow.com/questions/26192727/extract-content-of-script-with-beautifulsoup https://www.crummy.com/software/BeautifulSoup/bs4/doc/#string

wonslee avatar Nov 12 '22 15:11 wonslee