Sep-24-2018, 11:44 PM
what do you expect will happen if findAll doesn't find anything?
the statement: ('div',{'class':'ml1-SoccerStatsBar '})
means to find all div tags who have a class='ml1-SoccerStatsBar ' (including the space since it's part of the string.
As stated before, that web page doesn't have a single entry that satisfies that case.
for data in soup.findAll('div',{'class':'ml1-SoccerStatsBar '}):The loop will never execute!
the statement: ('div',{'class':'ml1-SoccerStatsBar '})
means to find all div tags who have a class='ml1-SoccerStatsBar ' (including the space since it's part of the string.
As stated before, that web page doesn't have a single entry that satisfies that case.