def getresult(url): contentAnalyst=cg_ali213_news_list() contentAnalyst.execute(url); content=contentAnalyst.result.content echo(content) echo(len(content.split("|"))) return contentAnalyst.result
def getresult(url=''): contentAnalyst=ali213XinyouContentAnalyst() contentAnalyst.execute(url); content=contentAnalyst.result.content title=contentAnalyst.result.article_properties["title"] source=contentAnalyst.result.article_properties["source"] contentAnalyst.result.article_properties["title"]=title+" [@@"+source+"]" echo(content) return contentAnalyst.result.toJsonString()
def lamda(self,csblock): cshyperblock=csblock[0] text=cshyperblock.Text() lm=cshyperblock.Find(".dd_lm").Text() title=cshyperblock.Find(".dd_bt > a").Text() href=cshyperblock.Find(".dd_bt > a").Attr("href") if len(text)>0 and lm.find("视频")==-1 and lm.find("I T")==-1: echo(title) return href else: return ""