jackyshan

导航

 

2013年10月18日

摘要: 1 import urllib2 2 3 class SimpleCookieHandler(urllib2.BaseHandler): 4 def http_request(self, req): 5 simple_cookie = 'PHPSESSID=fcf3c469c3c80f3e8480aca76c87faa;ocKey=c9821225458886fa8329cccc283e60e;wy_uid=b52fOIbsG%2BB6kyNmyU9esuL%2FRb8GTatlM4n5ghw7dP4;wy_pwd=f770PcQrsQ2YyEUO07ouNVJxM... 阅读全文
posted @ 2013-10-18 13:54 jackyshan 阅读(1102) 评论(0) 推荐(0) 编辑
 
摘要: #!/usr/bin/python# -*- coding: utf-8 -*-"""Function: Used to demostrate how to use Python code to emulate login baidu main page: http://www.baidu.com/Note: Before try to understand following code, firstly, please read the related articles: (1)【整理】关于抓取网页,分析网页内容,模拟登陆网站的逻辑/流程和注意事项htt... 阅读全文
posted @ 2013-10-18 13:51 jackyshan 阅读(1566) 评论(1) 推荐(1) 编辑