prepare for supporting python 3 and replace mechanize to requests