摘要:
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... 阅读全文
摘要:
#!/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... 阅读全文