D
D
dmazay822017-08-03 23:21:41
Python
dmazay82, 2017-08-03 23:21:41

How to select text between tags in grab for python?

There is a page with something like this

<div class="text">
  <h1>head1</h1>
    Text1
  <h3>head3</h3>
    Text2
</div>

How to select Text1, Text2 via g.doc.select(xpath) ?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ilya, 2017-08-04
@glebovgin

I am not a python-ist. so I will only speak for xpath.
Try
and
respectively.
You can try without [1] at the end yet.
This is if "on the forehead."

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question