I am attempting to scrape sports schedule data from the link below
https://sport-tv-guide.live/live/darts
I am using the following code below
import requests
from bs4 import BeautifulSoup
def makesoup(url):
page=requests.get(url)
return BeautifulSoup(page.text,"lxml")
def matchscrape(g_data):
for match in g_data:
datetimes = match.find('div', class_='main time col-sm-2 hidden-xs').text.strip()
print("DateTimes; ", datetimes)
print('-' *80)
def matches():
soup=makesoup(url = "https://sport-tv-guide.live/live/darts")
matchscrape(g_data = soup.findAll("div", {"class": "listData"}))
The issue I am having is only the first result is being returned (see below)
whereas there should be two values outputted (see below)
I printed the output received from running
def matches():
soup=makesoup(url = "https://sport-tv-guide.live/live/darts")
matchscrape(g_data = soup.findAll("div", {"class": "listData"}))
and it appears for some reason only the first result is being returned in the HTML (see below), which would lead to why only the first result is being returned, as this is the only result that can be found from the HTML received. What I am unsure of is why Beautifulsoup is not outputting the whole HTML so all the results can be outputted?
Thanks to anyone who can assist or solve this issue.



