diff --git a/get_cod_stats.py b/get_cod_stats.py index 8287172..d5d5de6 100644 --- a/get_cod_stats.py +++ b/get_cod_stats.py @@ -41,7 +41,8 @@ def check_user(user): def get_game_mode_stats_raw(user): url = "https://cod.tracker.gg/modern-warfare/profile/battlenet/{}/mp/modes".format(user) - source = requests.get(url).text + source = requests.get(url, headers={"User-Agent": "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:82.0) " + "Gecko/20100101 Firefox/82.0"}).text soup = BeautifulSoup(source, features="html5lib") scripts = [script.string for script in soup.find_all("script") if script.string] initial_state_script = None