mechanize python xe 238

Solutions on MaxInterview for mechanize python xe 238 by the best coders in the world

showing results for - "mechanize python xe 238"
Angela
17 Jan 2018
1def redirect(self):
2		try:
3			if self.agent == True:
4				br = Browser()
5
6				UserAgent = "Mozilla/5.0 (Windows NT 5.1; rv:31.0) Gecko/20100101 Firefox/31.0"
7				header = {"User-Agent" : UserAgent}
8				br.set_handle_robots(False)
9				br.addheaders = [("User-agent", "Fifefox")]
10				
11				remote_url = br.open(self.target).geturl()
12
13			else:
14				remote_url = u.urlopen(self.target).geturl()
15
16			return(remote_url)
17		except Exception as e:
18			print(e) 
similar questions
queries leading to this page
mechanize python xe 238