Skip to content

Snap Lens Tools 403 issue #174

Answered by dcordova20
TheeGuped asked this question in Q&A
Discussion options

You must be logged in to vote

cant take credit for this, i copied it from a discussion in the github for the snap lens tool. it worked for me though.

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.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by ptrumpis
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants