Perhaps you can work with the opener directly, rather than installing it. turn on the Fiddler proxy listener on 8008 (I use WebScarab, but they are probably the same), then try this code for sure (there are also cookies that you donβt need, but let's try it as it is and narrow it down later)):
cj = cookielib.MozillaCookieJar(cookie_filename) if os.access(cookie_filename, os.F_OK): cj.load() proxy_handler = urllib2.ProxyHandler({'https': 'localhost:8008'}) opener = urllib2.build_opener( proxy_handler, urllib2.HTTPCookieProcessor(cj) ) opener.addheaders = [ ('User-agent', ('Mozilla/4.0 (compatible; MSIE 6.0; ' 'Windows NT 5.2; .NET CLR 1.1.4322)')) ] auth = urllib.urlencode({'email':email,'pass':passw}) data = opener.open('https://login.facebook.com/login.php',data=auth)
so what I am doing is different: direct use of the opening device, changing the port to 8008, adding cookies and using WebScarab. let me know which one did the trick for you ...
ihadanny
source share