2

I am creating a football player search system and would like to implement a live stats into my database. I have received permission from opta sport to user their data for my project.

the data I would like to extract on a weekly basis is here :

http://www.whoscored.com/Regions/252/Tournaments/2/Seasons/4311/Stages/9155/PlayerStatistics/England-Premier-League-2014-2015

and looks as so:

R| Name | ..........Apps|   Mins|   Goals|  Assists |Yel|   Red|    SpG|    PS%|    AerialsWon| MotM

1|  Eden Hazard |  ...32 |      2841|   .....13| ..........8|    2| ....... -|  .2.1 |  86.9|   0.4 ..............|      9  

please ignore the '....' they are just in place to keep the information look how it should in here.

My problems are:

Issue 1: I do not have access to the sites database.

Issue 2: I do not know how to extract the data directly into my sql server.

Any assistance will be greatly appreciated .

Kamil Gosciminski
  • 16,547
  • 8
  • 49
  • 72
Yobo The Great
  • 95
  • 1
  • 13

1 Answers1

1

I would use python for this. On a weekly basis I would scrape the web page and read in data. If you observe the HTML of the page, all required data is present in the table with id top-player-stats-summary-grid . You can use BeautifulSoup for this.

from bs4 import BeautifulSoup as soup
 table = soup.find(id="top-player-stats-summary-grid")

The table variable now holds the data you want. Arranging that data in dictionaries is given here in a better manner. Parse HTML table to Python list?

Community
  • 1
  • 1
rahulmishra
  • 620
  • 1
  • 13
  • 29