I'm writing a script in python, using mechanize. I'm following a link:
br = mechanize.Browser()
br.open("http://www.neopets.com/browseshop.phtml?owner=nick_291540")
#returns last link
for link in br.links(url_regex="buy_item.phtml"):
placeholder = 1
br.follow_link(link)
I want to pretend that I'm being directed to the link from a certain url. How do I do this?