import requests # requests 라이브러리를 import합니다.

s = requests.session()
s.headers.update({ 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36' })


r1 = s.get('https://gall.dcinside.com/board/view/?id=programming', timeout=5)
print(r1.status_code)
print(r1.text)
if 'ci_c' not in s.cookies:
# ci_c 쿠키가 없을 경우 처리
print("ci_c 쿠키가 없습니다. 로그인이 필요할 수 있습니다.")
print("err") # 실행을 중지하고 싶지 않으면 err만 출력합니다.




a0482caa1b26782a904e5a48f691a9d3e17fe2478b8f67e23e5e93c3080d1b60c20be9


간단 코딩인데도 쿠키가 자꾸없다고만 나오네..