Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

requests 요청 시 header 설정 필요. #30

Open
galsys opened this issue Jul 9, 2024 · 0 comments
Open

requests 요청 시 header 설정 필요. #30

galsys opened this issue Jul 9, 2024 · 0 comments

Comments

@galsys
Copy link

galsys commented Jul 9, 2024

호출 할 때 헤더 설정 넣어줘야 코드 돌아가네요.

헤더 설정

headers = {
'Host': 'data.krx.co.kr',
'Origin': 'http://data.krx.co.kr',
'Referer': 'http://data.krx.co.kr/contents/MDC/MDI/mdiLoader/index.cmd?menuId=MDC0201020101',
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36'
}

항상 잘 사용하고 있습니다.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant