Python Forum
Scraping Data from Singapore Turf Club
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Scraping Data from Singapore Turf Club
#1
Hi Guys, I am currently trying to acquire Singapore racing data currently and I am currently entering it in manually which is time consuming to say the least. I am trying to explore all avenues of trying to automate the data acquisition to make this as convenient as possible. Most basic race meeting data is available via excel spreadsheets. I do not mind copying and pasting this data into my CSV file. However, the data I am interested in is in the "T-Chart" section. The website is dynamic and with my very little coding knowledge I am struggling to automate the scraping of this data.

I am interested in the early sectional data, the finishing sectional times (in brackets), the peak speed in km/h and average speed in km/h. To view the peak and average speed you need to click the dropdown menu and pick the highest value in the menu. Here is a link to an example of the results https://racing.turfclub.com.sg/en/race-r...2011-09-09

I am trying to acquire data from current date back to September 9, 2011. Any tips or advice on how to automate this would be greatly appreciated.

Thanks guys
Reply
#2
When you download data, you download it as xls.
Here is a good module for parsing XLS:

https://pypi.org/project/xlrd/
Reply
#3
Example Code:

import xlrd
book = xlrd.open_workbook("myfile.xls")
print("The number of worksheets is {0}".format(book.nsheets))
print("Worksheet name(s): {0}".format(book.sheet_names()))
sh = book.sheet_by_index(0)
print("{0} {1} {2}".format(sh.name, sh.nrows, sh.ncols))
print("Cell D30 is {0}".format(sh.cell_value(rowx=29, colx=3)))
for rx in range(sh.nrows):
    print(sh.row(rx))
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How to scraping data from dinamic site sergio21124444 2 694 Nov-08-2023, 12:43 PM
Last Post: sergio21124444
  Scraping data from table into existing dataframe vincer58 1 2,023 Jan-09-2022, 05:15 PM
Last Post: vincer58
  Web scraping data Mike_Eddy 2 2,543 Jul-03-2021, 05:49 PM
Last Post: Mike_Eddy
  Scraping lender data from Ren Ren Dai website using Python. I will pay for that 200$ Hafedh_2021 1 2,755 May-18-2021, 08:41 PM
Last Post: snippsat
  Scraping a page with log in data (security, proxies) iamaghost 0 2,151 Mar-27-2021, 02:56 PM
Last Post: iamaghost
  Singapore Turf Club Results singaporeman 1 1,885 Dec-15-2020, 07:04 PM
Last Post: Larz60+
Thumbs Up Issue facing while scraping the data from different websites in single script. Balamani 1 2,128 Oct-20-2020, 09:56 AM
Last Post: Larz60+
  POST request with form data issue web scraping hoff1022 1 2,703 Aug-14-2020, 10:25 AM
Last Post: kashcode
  Scraping Data issues TrexKikBut 1 3,909 Aug-14-2020, 10:20 AM
Last Post: kashcode
  Scraping a dynamic data-table in python through AJAX request filozofo 1 3,892 Aug-14-2020, 10:13 AM
Last Post: kashcode

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020