Terminate1 python 실행 중 key input 받고 종료하기 첫번째 예) import requests import keyboard # Set up a session object to make HTTP requests session = requests.Session() # Set up a variable to store the URL to crawl url = 'https://www.example.com' # Start crawling the website while True: # Check if the user has pressed the 'q' key if keyboard.is_pressed('q'): print('Exiting program...') break # Make a request to the URL response = session.get(url) .. 2023. 4. 25. 이전 1 다음