This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js and have Paul Jensen on-line!
See this thread for details.
Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

[help] Access UserName/Password restrict WebPages!  RSS feed

 
wei liu
Ranch Hand
Posts: 35
Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi everyone,

I am writing a crawler to download webpages but some pages are protected with username/password.

I am trying to use the authenticator to gain access to thoes pages provided with my username/password,but failed

here is my code below


and part of code from my crawler


I noticed by the result that only "MyMinningAuthenticator!!!" is printing out, but not the String "getPasswordAuthentication!!!"
is that means the protected method in MyMinningAuthenticatior is not running.


Thanks
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!