change User-Agent

master
Hofei 4 years ago
parent 3e8dc791d6
commit 6e65dcaa59

@ -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

Loading…
Cancel
Save