change User-Agent
This commit is contained in:
+2
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user