Use PIL, mechanize and lxml to do the whole job without manual intervention