Mar-04-2018, 08:46 PM
In the following code I'm trying to get the number 1151 from the span tag inside the span tag <span class="kno-fb-ctx _i2g">
The problem is the code isn't finding anything!
The output is 0. Should be 1 i think.
The problem is the code isn't finding anything!
from bs4 import BeautifulSoup import requests url = "https://www.google.com.br/search?q=timemania" source_code = requests.get(url) plaint_text = source_code.text soup = BeautifulSoup(plaint_text, 'html.parser') div_balls = soup.findAll('span', {'class':'kno-fb-ctx _i2g'}) print(len(div_balls))]]
The output is 0. Should be 1 i think.