我想从纯文本中删除数据:
"data": [
{
"id": "10150635906994798_21377910",
"from": {
"id": "100001249878256",
"location" : "Stockholm"
"name": "Mouhamadoul Moussa"
},
"message": "#Yeaaaahh!!! \u2665",
},
{
"id": "10150635906994798_21392047",
"from": {
"id": "100000648164454",
"location" : "Malmo"
"name": "mallow ty"
},
"message": "droit au butttttttttttttttttt",
},
]
但我只想检索第二个id,用于id选择的xpath
response.selector.xpath ('//*[contains(text(), "id")]')
输出应为:
100000648164454
100001249878256
那不是纯文本!这是一个json。但是,您可以将其存储为字典:
相关问题 更多 >
编程相关推荐