I am trying to crawl a website using a java program. Until last night it was working perfect, but now the server returns error code 401.
HOWEVER, I can still see the pages that I want through my web browsers. So, I don't know what is wrong? If the server add my IP to black list, so why can I see the URLs through the web browsers? If not, what else can cause 401 error?
Two more points: There is no username and password for this site and authentication is based on my IP.
Also, I tried to change my user agent, and now I get Error 503.
URLcon = url.openConnection(); URLcon.setRequestProperty("User-Agent", "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0)"); – Afshin Moazami Jan 03 '12 at 00:47