码迷,mamicode.com
首页 > Web开发 > 详细

css selector: xpath:

时间:2015-08-25 19:31:55      阅读:181      评论:0      收藏:0      [点我收藏+]

标签:

css selector:

$$(".mainLeft>div>h1")

xpath:

$x(".mainLeft>div>h1")

 

name = selectText(".mainLeft>div>h1");
xingzhi = selectText(".comTinyDes>tbody>tr:nth-child(1)>td:nth-child(2)>span");
guimo = selectText(".comTinyDes>tbody>tr:nth-child(2)>td:nth-child(2)>span");
wangzhan = selectText(".comTinyDes>tbody>tr:nth-child(3)>td:nth-child(2)>span");
hangye = selectText(".comTinyDes>tbody>tr:nth-child(4)>td:nth-child(2)>span");
dizhi = selectText(".comTinyDes>tbody>tr:nth-child(5)>td:nth-child(2)>span").replace("查看公司地图","");
jianjie = selectText("div[class=part2]").replace("公司介绍","");

 


dizhi:   $$(".lxfs>ul>li:nth-child(1)>font")
youbian:   $$(".lxfs>ul>li:nth-child(2)>font")
lianxiren:   $$(".lxfs>ul>li:nth-child(3)>font")

youxiang:   $$(".lxfs>ul>li:nth-child(4)>font")

dianhua:   $$(".lxfs>ul>li:nth-child(5)>font")

chuanzheng:   $$(".lxfs>ul>li:nth-child(6)>font")

 

css selector: xpath:

标签:

原文地址:http://www.cnblogs.com/timdes/p/4740175.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!