Skip to content

Commit

Permalink
Fix User-Agent
Browse files Browse the repository at this point in the history
  • Loading branch information
Ian committed Jan 27, 2022
1 parent fe75f05 commit 07e1c3a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion connectedcar/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def __init__(self, access_token, region):
'auth-token': access_token,
'Accept': '*/*',
'Accept-Language': 'en-US',
'User-Agent': 'fordpass-na/353 CFNetwork/1121.2.2 Darwin/19.3.0',
'User-Agent': 'FordPass/5 CFNetwork/1327.0.4 Darwin/21.2.0',
'Content-Type': 'application/json',
'Accept-Encoding': 'gzip, deflate, br',
'Application-Id': regions[region]
Expand Down
4 changes: 2 additions & 2 deletions connectedcar/connectedcar.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def get_user_access_token(self, username, password):
'Accept': '*/*',
'Accept-Language': 'en-US',
'Content-Type': 'application/x-www-form-urlencoded',
'User-Agent': 'fordpass-na/353 CFNetwork/1121.2.2 Darwin/19.3.0',
'User-Agent': 'FordPass/5 CFNetwork/1327.0.4 Darwin/21.2.0',
'Accept-Encoding': 'gzip, deflate, br',
}

Expand Down Expand Up @@ -99,7 +99,7 @@ def exchange_refresh_token(self, refresh_token):
'Accept': '*/*',
'Accept-Language': 'en-US',
'Content-Type': 'application/json',
'User-Agent': 'fordpass-na/353 CFNetwork/1121.2.2 Darwin/19.3.0',
'User-Agent': 'FordPass/5 CFNetwork/1327.0.4 Darwin/21.2.0',
'Accept-Encoding': 'gzip, deflate, br',
'Application-Id': self.region
}
Expand Down
2 changes: 1 addition & 1 deletion connectedcar/requester.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def call(method, url, **kwargs):

if "headers" not in kwargs:
kwargs["headers"] = {}
kwargs['headers']['User-Agent'] = 'fordpass-na/353 CFNetwork/1121.2.2 Darwin/19.3.0'
kwargs['headers']['User-Agent'] = 'FordPass/5 CFNetwork/1327.0.4 Darwin/21.2.0'

try:
response = requests.request(method, url, timeout=310, **kwargs)
Expand Down

0 comments on commit 07e1c3a

Please sign in to comment.