I'm trying to web scrape this ->
The HTML has a div tag with a class. in this div tag there is another div tag and there is another p tag with no class. My goal is to specifically get that lone p tag without the class and get the text data from it.
So far this is my code ->
I did not include some imports and other parts of my code.
html = driver.page_source
time.sleep(.1)
soup = bs.BeautifulSoup(html, 'lxml')
time.sleep(.1)
Class_Details = soup.find_all("div", {"class":"row-fluid data_row primary-row class-info class-not-checked"})
for class_detail in Class_Details:
Class_status = class_detail.find_all("div", {"class":"statusColumn"})
Status = Class_status[0].text
class_date = class_detail.find_all("p",{"class":"hide-above-small beforeCollapseShow"})
class_time = class_date[0].text
The 4 lines above can be ignored they work and accomplish their tasks, the lines below however do not and is what I am asking.
cla = class_detail.find_all("p",{"class":"timeColumn"})
print(cla)
The Output of print(cla) is
[]
[]
[]
[]
[]
[]
[]
The good thing is that there are 7 empty lists which do coincide with the websites so it definitely is counting/ sensing the part I am scraping however I need the output to be text.
I hope I have been clear in my question and thank you for your time.