Answer the question
In order to leave comments, you need to log in
How to take text from only one tag in bs4?
<math-input id="m7275895MI1" keyboard-skin="junior" keyboard-type="base" strict-check="false">
<math-input-answer>2</math-input-answer>
<math-input-answer>-2</math-input-answer>
</math-input> и
<math-input id="m7275895MI2" keyboard-skin="junior" keyboard-type="base" strict-check="false">
<math-input-answer>2</math-input-answer>
<math-input-answer>-2</math-input-answer>
</math-input>.</p>
for i in soup.find_all('math-input-answer'):
results.append(i.text)
Answer the question
In order to leave comments, you need to log in
I solved the problem like this, maybe someone needs it
for i in soup.find_all('math-input'):
j = i.find('math-input-answer')
results.append(j.text)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question