I have the same problem of this question : Python requests.get fails with 403 forbidden, even after using headers and Session object
unfortunately there is no answer.So how can i solve forbidden 403 ?
I tried:
Python requests - 403 forbidden - despite setting `User-Agent` headers
and :
Python requests. 403 Forbidden
Someone know another option to solve it ?
import requests
url_complete='https://smartsub.les.inf.puc-rio.br//media/imagens/5f667ec98b21262d4fc0a9dc5df4d0e4/8c6bbb5844e009eab139442e4024684d.jpg'
session = requests.Session()
headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.69 Safari/537.36 Edg/95.0.1020.53',
'referer':'https://smartsub.les.inf.puc-rio.br/login/?next=/'}
Picture_request = session.get(url_complete,headers=headers)
print(Picture_request)