Skip to content

Commit

Permalink
feat(app): update user agent header
Browse files Browse the repository at this point in the history
  • Loading branch information
skyme5 committed Nov 14, 2024
1 parent e97c579 commit 48e747e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion snapchat_dl/snapchat_dl.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion snapchat_dl/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "2.0.0"
__version__ = "2.0.1"

0 comments on commit 48e747e

Please sign in to comment.