Skip to content

Commit

Permalink
Merge pull request #23 from herissondev/fix_new_endpoint
Browse files Browse the repository at this point in the history
change auth request
  • Loading branch information
herissondev authored Nov 26, 2024
2 parents 831589f + 72bd160 commit 8fc4660
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/pyVinted/requester.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def __init__(self):
"User-Agent": "PostmanRuntime/7.28.4", # random.choice(USER_AGENTS),
"Host": "www.vinted.fr",
}
self.VINTED_AUTH_URL = "https://www.vinted.fr/auth/token_refresh"
self.VINTED_AUTH_URL = "https://www.vinted.fr/"
self.MAX_RETRIES = 3
self.session = requests.Session()
self.session.headers.update(self.HEADER)
Expand All @@ -24,7 +24,7 @@ def setLocale(self, locale):
Set the locale of the requester.
:param locale: str
"""
self.VINTED_AUTH_URL = f"https://{locale}/auth/token_refresh"
self.VINTED_AUTH_URL = f"https://{locale}/"
self.HEADER = {
"User-Agent": "PostmanRuntime/7.28.4", # random.choice(USER_AGENTS),
"Host": f"{locale}",
Expand Down Expand Up @@ -64,7 +64,7 @@ def setCookies(self):

try:

self.post(self.VINTED_AUTH_URL)
self.session.head(self.VINTED_AUTH_URL)
print("Cookies set!")

except Exception as e:
Expand Down

0 comments on commit 8fc4660

Please sign in to comment.