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

py-hanspell 사용 관련 #7

Open
shingiyeon opened this issue Jul 1, 2018 · 3 comments
Open

py-hanspell 사용 관련 #7

shingiyeon opened this issue Jul 1, 2018 · 3 comments

Comments

@shingiyeon
Copy link

py-hanspell의 spell-checker.py 부분에서

result = spell_checker.check() line에서

변수 r을 print해보면

<Response [403]>이 계속 뜨는데요,

즉, data = json.loads(r) 부분에서 계속 에러가 뜹니다.

혹시 현재 spell-checker가 사용이 불가능한지, 아니면 제 코드상에 오류인지 확인하고 싶습니다.

@lepus2
Copy link

lepus2 commented Jul 24, 2018

네이버 맞춤법 검사기 주소가 바뀐거 같습니다.
아래와 같이 바꾸면 될거 같습니다.

contants.py에서:
base_url = 'https://m.search.naver.com/p/csearch/ocontent/spellchecker.nhn'

spell_checker.py에서 headers에 추가:
'referer': 'https://search.naver.com/'

@amy-hyunji
Copy link

안녕하세요 말씀해주신 바와 같이 코드를 수정해보았는데,
아직도 동일한 에러가 나는데 혹시 다른 해결방법도 있으셨나요?

@calee88
Copy link

calee88 commented Jan 22, 2020

저는 @lepus2 님께서 하라고 하신 대로 수정한 후 해결이 되었습니다.

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

4 participants