you need to fix the structure of your code, and replace r with meaningful name:
import requests #here I send the data for the login response = requests.get('http://dls.delonghigroup.com/index.php?lang=it', auth=('?????', '?????')) if response.status_code == 200: #here after logging in I insert a link to an article articolo = requests.get('http://dls.delonghigroup.com/index.php?option=com_ecart&view=product&id=190353&lang=it') if articolo.status_code == 200: #print html page. print(articolo.content) else: print('requests failed with code {}'.format(articolo.status_code)) else: print('requests failed with code {}'.format(response.status_code))This may not fix your code, but it's still necessary (it worked when I tried it)