0

I know similar questions have been answered extensively, but here is a slightly different one.

I usually do:

URL='some_url'
requests.get(URL, auth=HTTPBasicAuth('userid','passwd'))

but now I am trying to download something from a website that requires only a password but no username. I have played around with None as userid but I still get <Response [403]>. Any ideas?

password prompt here

Suyama87
  • 85
  • 10
  • Does this answer your question? [HTTP authentication without username](https://stackoverflow.com/questions/49580896/http-authentication-without-username) – Marsroverr Jun 23 '20 at 14:07
  • Not at all. How are they related? Added more information above. – Suyama87 Jun 23 '20 at 14:12
  • From the answer I linked: "The Basic authentication scheme is based on the model that the client needs to authenticate itself with a username and a password for each protection space." It seems that if you aren't prompted for a username this wouldn't be basic auth. – Marsroverr Jun 23 '20 at 14:14
  • So what are you suggesting I do? – Suyama87 Jun 23 '20 at 14:16
  • 3
    If you're trying to authenticate with basic authentication to a website that expects a different method of authentication, you'll have to figure out what the website expects. Maybe it expects the password as a parameter? – Marsroverr Jun 23 '20 at 14:21
  • You'll need to post the specific website since each one has different security protocols. While it's 2020, not everyone uses standard OIDC tokes or an authorization provider. – Warren Parad Jun 24 '20 at 16:22
  • Can you please post here how exactly you intend to check the security protocol of the website given its address? – Suyama87 Jun 25 '20 at 14:45

0 Answers0