-
카테고리
-
세부 분야
데이터 분석
-
해결 여부
미해결
결과값 미출력 질문드려요..
19.10.05 17:21 작성 조회수 133
0
안녕하세요 강의 잘 보고 있습니다.
잘 따라하다가 마지막 결과값이 출력이 안되서요.. 사이트 구조가 바뀐게 아닌거같은데, 혹시 왜 값을 못가져오는 걸까요?ㅠㅜ
#요청 URL
URL = 'https://www.wishket.com/accounts/login/'
#Fake User-Agent 생성
ua = UserAgent()
with requests.Session() as s:
#URL 연결
s.get(URL)
#Login 정보 Payload
LOGIN_INFO = {
'identification': '정상아이디',
'password': '정상비번',
'csrfmiddlewaretoken': s.cookies['csrftoken']
}
#요청
response = s.post(URL, data=LOGIN_INFO, headers={'User-Agent': str(ua.chrome), 'Referer': 'https://www.wishket.com/accounts/login/'})
if response.status_code == 200 and response.ok:
soup = BeautifulSoup(response.text,'html.parser')
projectList = soup.select("table.table-responsive > tbody > tr")
print(projectList)
출력결과 :
[]
답변을 작성해보세요.
0
답변 1