How to find all tags and strings in a document using find next

0 votes

I am trying to find all the tags and string in a document after a particular element. I am using find_next() for this. 

name.find_next("p")

But the problem is that it is finding only the first element. How to find all elements?

May 14, 2019 in Python by Kumar
2,089 views

1 answer to this question.

0 votes

You can use the find_all_next() to do this. Try this:

name.find_all_next(string=True)

It should work.

answered May 14, 2019 by Robin

Related Questions In Python

0 votes
1 answer
0 votes
1 answer

how can i extact all the links from a website using python and save it in a csv file ?

Hi, @Shubham, Web scraping is the technique to ...READ MORE

answered Jun 16, 2020 in Python by Gitika
• 65,770 points
4,101 views
0 votes
1 answer

How to web scrape using python without using a browser?

Yes, you can use the headless mode. ...READ MORE

answered Apr 2, 2019 in Python by Yogi

edited Oct 7, 2021 by Sarfaraz 13,066 views
0 votes
1 answer

How to parse html file to BeautifulSoup?

Hey. Refer to the following code: driver.get("link") html = ...READ MORE

answered Apr 2, 2019 in Python by Kirti
1,936 views
0 votes
1 answer
0 votes
4 answers

What is a Tuple in Python and how to use it?

Tuples  are a  Unchanging sequence of values, ...READ MORE

answered Jun 21, 2020 in Python by sahil
• 500 points
1,962 views
0 votes
1 answer

how to find files and skip directories in os.listdir

You need to filter out directories; os.listdir() ...READ MORE

answered Mar 6, 2019 in Python by SDeb
• 13,300 points
9,746 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP