I want to build a bot to automate web browsing, this mean something like:
- filling forms
- press "submit" buttons
- find certain text inside pages
- and so on...
How can I do this with Mathematica?
The Import
function just make you download a single web page but it doesn't support cookies and similar things to build a complete automated bot, does Mathematica have some useful packet to do so?
Import
works). The question is very general in this form, and I'd be inclined to say Mathematica is not the right tool for this (you'll end up using JLink or .NETLink anyway). But if you can give a very specific example, we can think about how to implement it in Mathematica (or will be able to say with more confidence that it's not possible without external libraries) $\endgroup$wget
. You can include it in Mma code by usingRun
. About to go to bed but do a search cause posted something here in answer to another question a couple of weeks ago. ...here it is: mathematica.stackexchange.com/questions/1186/… $\endgroup$curl
: stackoverflow.com/a/6977128/695132 $\endgroup$Import[x,"Source"]
where x is the site (all manually downloaded w/ wget) and then find content usingStringCases[]
i.e.trlist = StringCases[pagetext, Shortest["<tr>" ~~ ___ ~~ "</tr>"]];
(which would find all text within rows in a page arranged in that way, for example) $\endgroup$