Код: Выделить всё
ori=response.xpath("//div[@class='comparison-
row']//div[contains(@class,'modern-
translation')]//span[contains(@class,'line-mapping')]")
Я делаю:
Код: Выделить всё
for r in ori:
id_n=r.xpath("@data-id").extract()
text_n=r.xpath("/text()").extract()
if len(id_n)!=0 and len(text_n)!=0:
ids.append(id_n)
text.append(text_n)
Код: Выделить всё
text_n=r.xpath("/text()").extract()
Код: Выделить всё
for r in ori:
n=r.extract()
print(n)
Код: Выделить всё
I'll stay at home and pray for God's blessing in your attempt.
Leave tomorrow, and be sure of this: anything that I can help you with, you shall have.
Подробнее здесь: https://stackoverflow.com/questions/493 ... a-selector
Мобильная версия