This seems similar to my previous post (i'll link at the bottom), but this is a different url and it uses tables. when i run the following code, i can get all of the data within that extracted:
import requests
from bs4 import BeautifulSoup
url = "https://www.nascar.com/wp-content/plugins/raw-feed/raw-feed.php"
r = requests.get(url)
soup = BeautifulSoup(r.text, "lxml")
try:
data = soup.find('div', class_='div-col1')
print(data)
except:
print("You Get Nothing!")
I then change up the try to
try:
data = soup.find_all('td', class_='car')
print(data)
except:
print("You Get Nothing!")
and I am only getting the info pulled from the thead
and not the tbody
Is there something i'm missing, or doing wrong? The further in i try to nail down, i either error out, or just get a return of empty [ ]
Also, this webpage is Dynamic, and i tried what was given to me in my previous thread Old Post, and i understand the layout and coding between the 2 pages is different, but my concern with that is that loading Chrome every time I run the script will be a lot since it will probably need tp be refreshed every 30sec-1min 300-400 times.