본문 바로가기

Crawling

url에 program으로 접근되지 않을 때


1. User-agent를 명시했는지 확인한다. 어떤 site는 User-agent를 명시하지 않을 경우 실제 내용을 보내주지 않은다. 
이런 경우는 많으므로 기본적으로 user agent를 넣기로 하자  
user-agent는  http://en.wikipedia.org/wiki/User_agent 위키피디아 페이지를 읽어 보면 된다. 

 it typically identifies itself, its application type,operating system, software vendor, or software revision, by submitting a characteristic identification string to its operating peer.

2. ip block
 상대방이 자신의 ip 혹은 ip 대역을 막아 놓았을 수도 있다. 즉, 사용자의 ip가 막혔는지를 확인해 보아야한다. 
까다롭지만.

 proxy를 통해서 download받아보는 방법으로 알아 볼 수 있다. 


아래는 user agent를 Mozilla로 넣고 일본 proxy를 통해서 접근 download를 요청해 보는 예이다. 

wget --execute=http_proxy=143.248.139.55:3124 -U 'Mozilla/5.001 (windows; U; NT4.0; en-us) Gecko/25250101' http://www.naver.com 


proxy 사이트 목록을 몇개 가지고 있음 좋겠다. 
PROXY_JP='133.11.240.57:3124 133.11.240.56:3128 203.178.133.2:3124 203.178.133.10:3127'
PROXY_KR='143.248.139.171:3124 143.248.139.56:3124 143.248.139.55:3124'
proxy : 대리, 대리권, 대리 투표, 위임장

'Crawling' 카테고리의 다른 글

크롤링에서 문서의 최신성 (freshness)  (0) 2011.09.06
Url redirection  (0) 2011.08.12
URL 파싱하기  (0) 2011.08.09
수집시에 HTTP 헤더의 if modified since  (0) 2011.06.24
url normalize (url 정규화)  (0) 2011.03.29