On 07/12/2023 17:39, Pierre Forstmann wrote:
I've tried this:
import requests
from urllib.parse import urlparse
url = 'https://www.postgresql.org/list/pgsql-bugs/mbox/pgsql-bugs.202312'
#response = requests.get(url, auth=('xxx','yyy'))
session = requests.session()
session.auth = ('xxx','yyy')
response = session.get(url)
print('status: ' + str(response.status_code))
print('... done')
print(response.content)
The session.auth is still doing a basic http auth, not what you need here.
Try opening your link in a browser in an anonymous window:
https://www.postgresql.org/list/pgsql-bugs/mbox/pgsql-bugs.202312 It redirects you to the login, you need to emulate that path in your script,
login into the website and then you can retrieve the mbox.
-- Andreas 'ads' Scherbaum
German PostgreSQL User Group
European PostgreSQL User Group - Board of Directors
Volunteer Regional Contact, Germany - PostgreSQL Project