def parse(content): # check(content) doc = html.fromstring(content) jdRaw = JdRaw(jdFrom="jd_zhilian") jdRaw.jdUrl = "" jdRaw.jdInc = jdinc.parse(doc) jdRaw.jdJob = jdjob.parse(doc) pub_date = doc.xpath("//ul[@class='terminal-ul clearfix']/li[3]/strong") if pub_date: jdRaw.pubDate = DtString(pub_date[0].text_content(), DataFlag(hasValue=True).toByte()) return jdRaw
def parse(content): doc = html.fromstring(content) jdRaw = JdRaw(jdFrom="jd_lagou") jdRaw.jdInc = jdinc.parse(doc) jdRaw.jdJob = jdjob.parse(doc) return jdRaw