使用scrapy

时间:2019-07-07 12:39:14

标签: scrapy

<meta name="GLOBEL:pageid" id="logsss_pageid" content="x-444511621">

尝试了response.css('#logsss_pageid')。extract()并得到:

 ['<meta name="GLOBEL:pageid" id="logsss_pageid" content="x-444511621">']

我需要的只是 x-444511621

1 个答案:

答案 0 :(得分:1)

尝试

response.css('#logsss_pageid').xpath('@content').get()

更多信息:selectors in scrapy using xpath