-
Notifications
You must be signed in to change notification settings - Fork 413
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
네이버 금융에서 셀트리온 스크래핑 시 AttributeError #24
Comments
AttributeError: 'NoneType' object has no attribute 'a' 상기 오류는 네이버에서 웹 스크레이핑을 차단했기 때문에 발생하는 것으로 네이버 금융에서 http 패킷 헤더에 브라우저 정보(User-Agent)가 존재하는지 체크하기 때문에 import requests 5장에 나오는 DBUpdater.py도 코드 수정이 필요하며 |
I had a same problem and changed the code like this. hdr = {'Host': 'finance.naver.com', req = urllib.request.Request(URL,headers = hdr) with urlopen(req) as doc: blah blah ~ Maybe it can be updated on the later release of book Is crawling the Naver Finance in law? ? Why would they updated network request policy like this ? when they forbid the crawling, what do you suggest for updating stock price DB ? Could we get the market data from "http://www.krx.co.kr/" ? |
Thanks for notifying me.
I don't know why Naver Finance forbid the crawling without User-Agent information, Even if Naver Finance blocks any kind of the crawling, |
아 한글로 회신 주셔도 됩니다 ㅎ. 작년에 책사고 묵혀두다가 최근에 centos에서 공부중인데 xrdp에서 한글 104키보드가 동작을 안해서 영어로 썻어요. |
finance.naver.com 의 셀트리온 url에서 스크래핑하는 과정에서 책에 나온 코드대로 작성했더니
AttributeError: 'NoneType' object has no attribute 'a' 에러 발생합니다. 어떻게 해결할 수 있을까요??
The text was updated successfully, but these errors were encountered: