You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been trying to use the script below to scrap data from the match_stats endpoint
However I can't make. Am I missing something or is this script deprecated due to some evolutions of the API ?
Best regards
from match_stats_match_info import tourney_matches
from match_stats_tourney_list import tourneys
from match_stats_players_data_extended import match_data_extended
from match_stats_players_data import match_data
from scraping import add2csv
import chromedriver_autoinstaller
from selenium import webdriver
for i in range (match_index, match_count):
tourney_slug = tourney_matches_array[i][1]
match_id = tourney_matches_array[i][2]
match_stats_url_suffix = tourney_matches_array[i][7]
match_stats_url = url_prefix + match_stats_url_suffix
Hi,
I've been trying to use the script below to scrap data from the match_stats endpoint
However I can't make. Am I missing something or is this script deprecated due to some evolutions of the API ?
Best regards
from match_stats_match_info import tourney_matches
from match_stats_tourney_list import tourneys
from match_stats_players_data_extended import match_data_extended
from match_stats_players_data import match_data
from scraping import add2csv
import chromedriver_autoinstaller
from selenium import webdriver
User selects year
tourney_year = input('\nEnter year: ')
tourneys(tourney_year)
User selects tournament
tourney_selected = input('\nEnter tourney number: ')
print('')
tourney_index = int(tourney_selected) - 1
tourney_matches_array = tourney_matches(tourney_year, tourney_index)
match_count = len(tourney_matches_array)
for match_info in tourney_matches_array:
print(str(match_info[0]) + ' - ' + match_info[1] + ' - ' + match_info[2] + ' - ' + match_info[4])
User selects match to start scraping
match_selected = input('\nEnter match to start scraping: ')
print('')
match_index = int(match_selected) - 1
url_prefix = 'https://www.atptour.com'
chromedriver_autoinstaller.install()
driver = webdriver.Chrome()
for i in range (match_index, match_count):
tourney_slug = tourney_matches_array[i][1]
match_id = tourney_matches_array[i][2]
match_stats_url_suffix = tourney_matches_array[i][7]
match_stats_url = url_prefix + match_stats_url_suffix
The text was updated successfully, but these errors were encountered: