Skip to content

Commit

Permalink
Merge main into sweep/add-sweep-config
Browse files Browse the repository at this point in the history
  • Loading branch information
sweep-ai[bot] authored Feb 24, 2024
2 parents a3bf9c7 + dfbd25c commit 3e9cd84
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions parse_statsbomb_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,11 @@ def get_distance_from_two_points(

def get_json_from_web_gz(url: str):
""" """
user_agent = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) " + \
"AppleWebKit/537.36 (KHTML, like Gecko) " + \
"Chrome/83.0.4103.97 Safari/537.36"
headers = {
"User-Agent": """
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4)
AppleWebKit/537.36 (KHTML, like Gecko)
Chrome/83.0.4103.97 Safari/537.36
""".replace(" M", "M").replace(" ", " ")
"User-Agent": user_agent
}
logging.info(f"Getting data from url `{url}`")
logging.info("Attempting to download data and hold the data in memory.")
Expand Down Expand Up @@ -90,13 +89,11 @@ def get_list_of_statsbomb_games():
# it would look like this:
# seasons["2000/2001"] = 2000
seasons[f"{i}/{i+1}"] = i

user_agent = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) " + \
"AppleWebKit/537.36 (KHTML, like Gecko) " + \
"Chrome/83.0.4103.97 Safari/537.36"
headers = {
"User-Agent": """
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4)
AppleWebKit/537.36 (KHTML, like Gecko)
Chrome/83.0.4103.97 Safari/537.36
""".replace(" M", "M").replace(" ", " ")
"User-Agent": user_agent
}
url = (
"https://raw.githubusercontent.com/" +
Expand Down

0 comments on commit 3e9cd84

Please sign in to comment.