Question: Get heavily nested li elements


Get heavily nested li elements

Answers 0
Added at 2016-12-12 20:12

I have looked around on lots of posts regarding bs4 and getting html elements, at which I have suceeded, however, when I try to get nested elements which in this case is a li element I don't have luck.


with requests.Session() as c:
url = ''
USERNAME = 'usr'
PASSWORD = 'pass'
login_data = dict(username=USERNAME, password=PASSWORD), data=login_data, headers={"Referer": ""})
tasks = c.get("")

print tasks.content

soup = bs(urllib2.urlopen("").read(), "html.parser")

tasks_list = soup.findAll('li', class_="ff-task")

print tasks_list

What is returned from this is []

Example li element:

Linked above is the html and you can see the li/s which I am trying to get.

Any help will be appreciated.

Answers to

Get heavily nested li elements

Source Show
◀ Wstecz