Mechanize in Haskell or Revive Shpider?

13 Nov
2014
13 Nov
'14
5:14 p.m.
What would be a good way to model mechanize in Haskell? For instance the python mechanize example is quite simple: def google_search(keyword): br = mechanize.Browser() br.open("https://www.google.com") br.select_form(name="gbqf") br["q"] = keyword response = br.submit() print html_to_text(response.read()) I was thinking I could just use a StateT monad transformer with the current pages html as a cursor. Then have something like: get "http://www.google.com" >>= (\c -> c $// form (Name "gbqf") >=> input (Name "q") &| submit . modifyVal "query" "Haskell") That's kinda horrible but it's a place to start. Or would I be better off trying to revive Shpider?
3842
Age (days ago)
3842
Last active (days ago)
0 comments
1 participants
participants (1)
-
Cody Goodman