#! /usr/bin/python
# - * - coding:utf-8 -*-


"""
Author: AsherYang
Email:  1181830457@qq.com
Date:   2017/5/23
Desc:   智联招聘类
"""

ZHILIAN_LOGIN_URL = ''

class ZhilianJob():

    def login(self):
        return


@@ -37,16 +37,92 @@
 f-8 -*-%0A
+import urllib2%0Aimport urllib%0Aimport cookielib%0Aimport lxml.html%0Aimport pprint
 %0A%0A%22%22%22%0AAu
@@ -199,16 +199,61 @@
 %E6%8B%9B%E8%81%98%E7%B1%BB%0A%22%22%22%0A
+ZHILIAN_HOST_URL = 'https://www.zhaopin.com/'
 %0AZHILIAN
@@ -302,20 +302,820 @@
 def 
-login(self):
+__init__(self):%0A        self.name = ''%0A        self.pwd = ''%0A        self.cj = ''%0A        self.handler = ''%0A        self.opener = ''%0A%0A    def initCookie(self):%0A        self.cj = cookielib.CookieJar()%0A        self.handler = urllib2.HTTPCookieProcessor(self.cj)%0A        self.opener = urllib2.build_opener(self.handler)%0A%0A    def parse_form(self, html):%0A        tree = lxml.html.fromstring(html)%0A        data = %7B%7D%0A        for e in tree.cssselect('form input'):%0A            if e.get('name'):%0A                data%5Be.get('name')%5D = e.get('value')%0A        return data%0A%0A    def login(self):%0A        self.initCookie()%0A        html = self.opener.open(ZHILIAN_HOST_URL).read()%0A        data = self.parse_form(html)%0A        data%5B'loginname'%5D = self.name%0A        data%5B'Password'%5D = self.pwd%0A        pprint.pprint(data)%0A        
 %0A   

add zhilianjob