Z
Z
Zhenia Bel2021-11-27 02:36:06
Python
Zhenia Bel, 2021-11-27 02:36:06

How to parse a tag of a specific html tag if its class is repeated, do I need to do this through beautifulsou?

How to parse a tag of a specific html tag if its class is repeated, do I need to do this through beautifulsou?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
shurshur, 2021-11-27
@shurshur

Just iterate over all you need:

for node in xxx.findall('div', class_='foobar'):
  ...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question