views:

391

answers:

2

I have used mechanize in Python with great success. However, I am trying to learn Scala. I have an IRC bot that I would like to add some features to, mostly having to do with screen scraping web pages from our corporate intranet. That requires being redirected to a corp-wide login page, then going to the destination, then having to possibly submit another login.

Does anyone know of something that I can use from Scala to get this sort of functionality?

+1  A: 

I don't know any Scala effort of similar functionality. Pending answers to the contrary, I advise you to look for Java libraries of similar functionality.

Daniel
I found Prowser, which is a Java library that works a lot like mechanize. So far I have been experimenting with that.
Christopher
A: 

The closest Java libraries I can think of are browser drivers. The most well-known are Selenium and WebDriver. The latter also offers an in-process mode.

Since Selenium's API isn't all that pleasent to use, a couple of projects sprung-up with DSLish façades: Selenium DSL and Selenium Inspector.

A caveat is that they are all oriented towards testing of web application, so they might be lacking in features that attend your case.

Rafael de F. Ferreira