According to the source code, follow_link()
and click_link()
use link's absolute_url
property that is set during the link initialization. And, you are setting only url
and base_url
properties.
The solution would be to change the absolute_url
of a link in the loop:
BASE_URL = 'link_to_the_page'
for link in br.links(url_regex='/academic/utility/AcademicRecord.jsp?'):
modified_link = ...
link.absolute_url = mechanize.urljoin(BASE_URL, modified_link)
br.follow_link(link)
Hope that helps.