From 48e747e5eb0d49b4fbe2ae47196aa3e9457e8f9c Mon Sep 17 00:00:00 2001 From: Aakash Gajjar Date: Fri, 15 Nov 2024 00:02:39 +0530 Subject: [PATCH] feat(app): update user agent header --- snapchat_dl/snapchat_dl.py | 7 ++++++- snapchat_dl/version.py | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/snapchat_dl/snapchat_dl.py b/snapchat_dl/snapchat_dl.py index 804e0ad..7aee59f 100644 --- a/snapchat_dl/snapchat_dl.py +++ b/snapchat_dl/snapchat_dl.py @@ -43,7 +43,12 @@ def __init__( def _api_response(self, username): web_url = self.endpoint_web.format(username) - return requests.get(web_url).text + return requests.get( + web_url, + headers={ + "User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36" + }, + ).text def _web_fetch_story(self, username): """Download user stories from Web. diff --git a/snapchat_dl/version.py b/snapchat_dl/version.py index 8c0d5d5..159d48b 100644 --- a/snapchat_dl/version.py +++ b/snapchat_dl/version.py @@ -1 +1 @@ -__version__ = "2.0.0" +__version__ = "2.0.1"