Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

403 Client error #21

Open
fusionhead opened this issue Nov 15, 2024 · 1 comment
Open

403 Client error #21

fusionhead opened this issue Nov 15, 2024 · 1 comment

Comments

@fusionhead
Copy link

When trying to search a filter, i got this error

403 Client Error: Forbidden for url: https://www.snapchat.com/lens/6ac2c0c06ef347219d6c9f36027f0e7a

I'm using the latest Snap Lens Tool (v0.7.0), phython 3.10.0, pip 24.3.1 and all requirement already satisfied.
What did i do wrong? thank you.

@roastcom
Copy link

What happens there is the 'fake browser' that the web crawler pretends to be doesn't look authentic enough to the host.

Go to the file ..\src\core\lens_crawler.py and modify line 36 as follows:
BEFORE:
response = requests.get(url)
AFTER:
def_agent = 'Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:70.0) Gecko/20100101 Firefox/70.0'
header = {'user-agent': def_agent, 'referer': url}
response = requests.get(url,headers=header)

That should do it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants