BackEnd/Automation Program with Python
[파이썬 고급 스크랩핑] requests 통신(로그인 처리) 루리웹
import sys import io from bs4 import BeautifulSoup import requests sys.stdout = io.TextIOWrapper(sys.stdout.detach(), encoding = 'utf-8') sys.stddrr = io.TextIOWrapper(sys.stdout.detach(), encoding = 'utf-8') # 로그인 유저정보 LOGIN_info = { 'user_id' : 'test_id_1234', 'user_pw' : 'test_pw_1234!' } # Session 생성 with 구문 안에서 유지 with requests.Session() as s: login_req = s.post('https://user.ruliweb.com/me..