Q:

Python and beautifulsoup - How to select only a specific slection of a class?

mainBody = urlsoup.find_all(style_="display: none;")
mainBody = urlsoup.find_all(style_="display: none;"[0])

If there are two of the same styles or classes, how do I select the 1st or 2nd?
How could I get the second line of code to work allowing me to select one or the other?

A:

You are putting the [0] to an incorrect place, replace:
mainBody = urlsoup.find_all(style_="display: none;"[0])

with:
mainBody = urlsoup.find_all(style_="display: none;")[0]

