public inbox for [email protected]
help / color / mirror / Atom feedFrom: Andreas 'ads' Scherbaum <[email protected]>
To: Pierre Forstmann <[email protected]>
To: [email protected]
Cc: [email protected]
Subject: Re: cannot download mbox with python
Date: Thu, 7 Dec 2023 17:49:46 +0100
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAM-sOH_TOtSDVHbC76hyr3akFt2P6o8myFcFdOiGpq6GCDc9JA@mail.gmail.com>
References: <CAM-sOH8qZxmza4xm29jbNNpfXYDu7eUUZSXHgJ9dCoUbHK86OQ@mail.gmail.com>
<[email protected]>
<CAM-sOH_TOtSDVHbC76hyr3akFt2P6o8myFcFdOiGpq6GCDc9JA@mail.gmail.com>
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
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected]
Subject: Re: cannot download mbox with python
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox